So how do I do it?

F

Fizzle

In row 1 of columns A, B, C, D, and E are the numbers 1, 2, 3, 4 and
5. So in cell D1 there is a 4. The numbers 1 thru 5 refer to the day
of the month,

I will enter data in rows 2 thru 10 of columns A thru D starting with
column A which is the first day of the month. The next day I will
enter data in column B and so on.

I want to put a formula in cell K1 that I will describe. I want K1 to
show the number on row 1 that represents the last column with data.
Therefore, on the third day when I enter data in cells C2:C10 cell K1
will read 3. The next day when numbers are put into the column D
range, K1 will read 4.

So how do I do it?
 
N

Nick Hodge

Fizzle

You could use nested IFs (In K2)

=IF(A2="","",IF(B2="",1,IF(C2="",2,IF(D2="",3,IF(E2="",4,5)))))

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
[email protected]
 
F

Fizzle

Nick

That might work but instead of 5 days used in the example I'm dealing
with 31 and the formula becomes too long.
 
F

Fizzle

Rag

That works only if numbers are put into row 2. In practice not every
A2:AE2 cell will have data.
 
R

Ragdyer

Can you pick a row that will *always* contain data for all the days.
You realize that you can change it to search *any* row you desire.
 
F

Fizzle

Frank

That's the problem. Data may be put into cells 2 thru 10 but if
nothing is entered in row 2 the formula reverts to the last row 2
entry.
 
F

Fizzle

Rag

You're right. There is a row that always has data and I will change
the formula to work off of it.

Thanks guys!
 
Top