Automatic copying data excluding blank cells

G

Guest

I have one column with a formula in multiple rows within the same column.
The formula pulls data from other parts of the spreadsheet or leaves the
cells blank. An example of the formula is =if(A1=0,â€â€,A1).

The outcome is to have a column with data in multiple rows mixed with blank
cells like so.

Bob
Mary
“Blankâ€
Joe
“Blankâ€
Jill

What I would like to do is pull the data automatically from this column
putting the data in another column excluding the “Blank†cells like so:

Bob
Mary
Joe
Jill

Any help would be most appreciated.

Thank you,

Wesley
 
M

Max

Here's the response given earlier:

One way ..

Assuming the col below is in B1:B100
(which are returns by formula)
Bob
Mary
"Blank"
Joe
"Blank"
Jill
etc

Select C1:C100

Put in the formula bar:

=IF(ISERROR(SMALL(IF(B1:B100<>"",ROW(B1:B100)),ROW())),"",INDEX(B:B,MATCH(SM
ALL(IF(B1:B100<>"",ROW(B1:B100)),ROW()),IF(B1:B100<>"",ROW(B1:B100)),0)))

Array-enter with CTRL+SHIFT+ENTER
instead of just pressing ENTER

For the sample above,
you'll get the desired results in C1:C100:

Bob
Mary
Joe
Jill
<Rest of the range are "blanks">

Adapt to suit
 
W

Wesley

Hi Max,

thanks - the formula is just what i needed. However for
some reason I can't get the array to work when i copy it
into the actual worksheet that i'm using. I've changed the
formula cell's from B1:B100 to where I need it to search
(column I51:I57) and array-enter - however it just stays
blank?! i'm stumped - do you know why this might be?
Thanks!
 
M

Max

Try this slight mod ..

Your target range is I51:I57

Select an adjacent range, say J51:J57

Put in the formula bar and array-enter:

=IF(ISERROR(SMALL(IF(I51:I57<>"",ROW(A1:A7)),ROW(A1:A7))),"",INDEX($I$51:$I$
57,MATCH(SMALL(IF(I51:I57<>"",ROW(A1:A7)),ROW(A1:A7)),IF(I51:I57<>"",ROW(A1:
A7)),0)))

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <at>yahoo<dot>com
----
Hi Max,

thanks - the formula is just what i needed. However for
some reason I can't get the array to work when i copy it
into the actual worksheet that i'm using. I've changed the
formula cell's from B1:B100 to where I need it to search
(column I51:I57) and array-enter - however it just stays
blank?! i'm stumped - do you know why this might be?
Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top