Auto filling a table of numbers

R

Rod

I have a table as follows and each of the numbers are contained in individual
cells:

1 0 3 0 0 6 0 8
9 0 0 0 13 0 15

I now want to fill another table automatically with the final outcome:

1 3 6 8 9 13 15 again each number in individual cells.

How would I go about achieving this outcome?

Thanks
Rod
 
L

~L

By my understanding, you are looking for the non-zero numbers of the two
previous rows to fill in the third row. If I have misunderstood, this
formula won't be very useful to you.

If this data is arranged in A1:H2, highlight 7 (or however many, with the
understanding that it will return an error if it runs out of numbers to
display) cells in row 3 and using CTRL+SHIFT+ENTER apply the array formula:

=SMALL($A$1:$H$2,COUNTIF($A$1:$H$2,0)+{1,2,3,4,5,6,7,8,9})

This will display up to 9 numbers. You can add additional numbers if you
like by continuing that series.

Did that help?
 
R

Rod

Thanks..maybe I need to be a lot clearer.

The first table look like this:

1 0 3 0 0 0 7 0 0
10 0 12 0 0 15 0
0 18 0 0 21 0 0 24

The outcome I am looking for:
1 3 7 10 12 15 18 21 24

This outcome can be anywhere in the same sheet or in another sheet and each
of the numbers in the two tables need to be in individual cells.

Thanks
Reza
 
L

~L

To accomodate these changes, my previous formula would change from:

=SMALL($A$1:$H$2,COUNTIF($A$1:$H$2,0)+{1,2,3,4,5,6,7,8,9})

To:

=SMALL($A$1:$H$3,COUNTIF($A$1:$H$3,0)+{1,2,3,4,5,6,7,8,9,10})

And to apply it, highlight 10 cells in row 4 (or any 10 cells within the
same row) and in one of the cells enter the second formula, then hold control
and shift while pressing enter.

If you move this formula to sheet2 row 1 and the data stays in the same
spot, it would change to:

=SMALL(Sheet1!$A$1:$H$3,COUNTIF(Sheet1!$A$1:$H$3,0)+{1,2,3,4,5,6,7,8,9,10})

Is there some other feature of this data that I'm missing?

Am I correct that you are looking for all the non-zero numbers from your
data range?
 

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