return first value greater than zero

R

Rae

This is probably easy, but I just can't figure it out...

Here is an example of what I'm trying to accomplish:
(Data Sheet)
A B C D E F G
1 Date 8/25 8/26 8/27 8/28 8/29 8/30
2 Fcst 0 0 0 0 250 500

(Summary Sheet)
A B
1 SUMMARY
2 Qty of First Req 250 (this is what i'm having trouble with... i need it
to pull the first non-zero value from Data Sheet, Row 2, Columns A thru G)

3 Date of First Req 8/29 (Ideally, i would like it to also pull the
corresponding Date of first non-zero value)

Thanks for the help!
 
P

Peo Sjoblom

To get the value

=INDEX(A2:G2,MATCH(TRUE,A2:G2>0,0))


to get the date

=INDEX(A1:G1,MATCH(TRUE,A2:G2>0,0))


both formulas need to be entered with ctrl + shift & enter

the second needs to be formatted as date or else you will get a serial
number
counting the number of days since Jan 0 1900

--


Regards,


Peo Sjoblom
 
T

Teethless mama

Try this:

=INDEX(A1:G1,MATCH(1,INDEX((A2:G2>0)*(ISNUMBER(A2:G2)),),))

Just press ENTER
 

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