First Occurence of Non Blank Cell in row array

E

ExcelMonkey

I have an array of yearly dates in A2:A20. I then have
an array below it B2:B20 that the user can enter costs
into. I want to be able to identify the year that the
first cost appears in. The cells that do not have
numbers will be left blank. How do I do this? I know I
can count the occurences of cells with data:

Sumproduct(--(B2:B20>0))

But how do I identify which column or year the first of
these occurs in?

Thanks
 
E

ExcelMonkey

figured it out with an array formula

{Index(A2:A20,Match(TRUE,NOT(ISBLANK(B2:B20)),0)}
 
J

Jason Morin

=INDEX(A2:A20,MATCH(1,1/(LEN(B2:B20)>0),0))

Array-entered. Press ctrl + shift + enter.

HTH
Jason
Atlanta, GA
 
E

ExcelMonkey

Just out of curiosity, my model crashes with I enter my
array formula. I am copying it down 200 rows. Does
anyone know of a solution that does not involve an array
formula?

Thanks
 
E

ExcelMonkey

Model would crash if I copied array formula down to many
rows at once. Copies a few rows at a time and it seems
to work now???? Not sure why but it works.
 

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