I'm having problem while calculating streaks. I know how it's done, but
I have empty cells in the middle which prevents me getting the streaks
right.
What I'd like to do, is to copy all the numbers to another sheet losing
all empty cells from the middle.
Here's the example. At left side there numbers and A6-A8 are empty
cells. At right side is the example how I would like it to look. So
that A6-A8 from left side would not be copied and cells with numbers
moved up to join first group.Code:
--------------------
A | A
1 3 | 1 3
2 2 | 2 2
3 5 | 3 5
4 2 | 4 2
5 0 | 5 0
6 | 6 2
7 | 7 1
8 | 8 4
9 2 | 9 2
10 1 | 10 2
11 4 | 11 3
12 2 | 12 1
13 2 | 13
14 3 | 14
15 1 | 15
--------------------I couldn't find any function to do this, is there an easy way?
Thanks in advance, again --
Handyy
------------------------------------------------------------------------
Handyy's Profile: www.excelforum.com/member.php...oamp;userid=30958
View this thread: www.excelforum.com/showthread...hreadid=510298One play, using non-array formulas ..
Source data in A1 down
In B1:
=IF(ISERROR(SMALL(C:C,ROW(A1))),quot;quot;,
INDEX(A:A,MATCH(SMALL(C:C,ROW(A1)),C:C,ROW(A1))))
In C1: =IF(A1=quot;quot;,quot;quot;,ROW())
Select B1:C1, copy down to say, C100,
to cover the max expected extent of data in col A
Col B will return the required results
--
Max
Singapore
savefile.com/projects/236895
xdemechanik
---
quot;Handyyquot; gt; wrote in
message ...
gt;
gt; I'm having problem while calculating streaks. I know how it's done, but
gt; I have empty cells in the middle which prevents me getting the streaks
gt; right.
gt;
gt; What I'd like to do, is to copy all the numbers to another sheet losing
gt; all empty cells from the middle.
gt;
gt; Here's the example. At left side there numbers and A6-A8 are empty
gt; cells. At right side is the example how I would like it to look. So
gt; that A6-A8 from left side would not be copied and cells with numbers
gt; moved up to join first group.
gt;
gt;
gt; Code:
gt; --------------------
gt; A | A
gt; 1 3 | 1 3
gt; 2 2 | 2 2
gt; 3 5 | 3 5
gt; 4 2 | 4 2
gt; 5 0 | 5 0
gt; 6 | 6 2
gt; 7 | 7 1
gt; 8 | 8 4
gt; 9 2 | 9 2
gt; 10 1 | 10 2
gt; 11 4 | 11 3
gt; 12 2 | 12 1
gt; 13 2 | 13
gt; 14 3 | 14
gt; 15 1 | 15
gt; --------------------
gt;
gt;
gt; I couldn't find any function to do this, is there an easy way?
gt;
gt; Thanks in advance, again
gt;
gt;
gt; --
gt; Handyy
gt; ------------------------------------------------------------------------
gt; Handyy's Profile:
www.excelforum.com/member.php...oamp;userid=30958
gt; View this thread: www.excelforum.com/showthread...hreadid=510298
gt;
- Oct 05 Fri 2007 20:40
Copying values but skipping empty cells
close
全站熱搜
留言列表
發表留言