# Excel - in a row of numbers, put last entered number Cell B2

R

#### RJ

Cell A1 has number for January, Cell A2 number for Feb, Cell A3 number for
Mar etc.

I need a formula that will pull the data from the last month entered into
B2. (IF A12 is blank get A11, but if A11 is blank get A10, if A10 is also
blank get A9 etc.) This needs to go for at least 12 - 15 cells)
Thanks

G

#### Gary''s Student

=LOOKUP(2,1/(1:1>0),1:1)

R

#### RJ

Thank you. That works fine.... how do I modify the formula what if I wanted
to put number in cell W1 instead of B2?

G

#### Gary''s Student

Fortunately, we can put this formula in any cell (except cells in the first
row).

R

#### RJ

I was afraid of that in my tests.

Is there a different formula that would work at the end of a row of cells to
use the first cell to the left with a number in it?

R

#### RagDyer

You could use a formula where you declare the range to use.

Say you wanted to use A1 to Z1, then you could place this formula in Row1,
as long as it was *outside* the referenced cells.

So, you could enter this in say AA1:

=Lookup(99^99,A1:z1)

R

#### RJ

PERFECT! Thanks to both you and Gary for great formulas!