View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
danpt danpt is offline
external usenet poster
 
Posts: 49
Default First non empty cell and non blank cell

Hi, Shane
Thanks to T.Valko with
=INDEX(A1:A10,MATCH(1,SUBTOTAL(3,OFFSET(A1:A10,,,R OW(A1:A10)-MIN(ROW(A1))+1)),0))
A non empty cell is a cell either with ' or has a formula =IF(B1="","",B2)
in cell(A5) for example.
Thank you

"ShaneDevenshire" wrote:

Hi,

Here is one way:

INDEX(A1:A22,MIN(IF((A1:A22<"")*(ROW(A1:A22))0,R OW(A1:A22),"")))

This is an arry entered formula so press Shift+Ctrl+Enter instead of Enter.

Regarding the second question, in excel a non empty cell and a non blank
cell are the same thing. If you mean something different you should explainl

However, if you mean that one of the cells contains a formula which returns
"" and you want to consider that as nonblank then:

=INDEX(A1:A22,MIN(IF((ISBLANK(A1:A22))*(ROW(A1:A22 ))0,ROW(A1:A22),"")))

Also array entered.


If this helps, please click the Yes button.
--
Thanks,
Shane Devenshire


"danpt" wrote:

Can someone help me out with a formula that will return the value of the
first non empty cell of a column.
And, also a formula that will return the value of the first non blank cell
of a column.
Thank you