Thanks for the responds,
That formula really works. What if without { and }, is there any way to
write the formula which gives
the same result?
I'll be glad to hear if it is possible.
i took a look at rons formula and noticed errors on my original. i put a
redundant index&match inside a match()...and i hardcoded the row at 2.
also my formula only works up to column Z. so Rons formula with address
() would be the better way to go.
heres a cleaned up formula
=CHAR(65+MATCH(TRUE,LEN(B2:Z2)<>0,0))&ROW(B2)
again,its an array, so you needs to hit ctrl-shift-enter.
now once you do that...along with the new row(b2) you can fill the
formula down the column real easy.
it needs { and } because its using match() to find the 1st non-blank
across every cell in the row. the only way around it would be to use a
sumproduct() or an offset() formula of some sort.
the len(b2:z2)<>0 looks at the length of the data in every cell in the
range and stores it stores it in memory as a "true" or "false". and this
is why you need to hit ctrl-shift-enter. if you dont, then excel wont
know to store the range into memory, and will only look at 1st cell.
the match() will match the 1st "true" in the len() range and pull the
column#...and add it to the =char(65)