IF Statement or nested IF

R

Rahim

I have 4 stations , lets say A, B, C, D with daily Temperature Data, I want
fill up missinf data "M" for station A from stations B,C,D; if I write =if
(a2="M", b2, a2) to get datat from staion B, BUT station B may have missing
"M" so I need to get the data from station C for that particular date and
again if Station C has "M" for the same day I need to get it from station D.
so

should I write
=IF(D2="M",E2*(IF(E2="M",F2,E2),D2))

but this gives me result "FALSE", can anybody help me

I appreciate your help, thanks
 
J

Jacob Skaria

Hi Rahim

Try the below formula in cell A2
=INDEX(B2:D2,MATCH(TRUE,INDEX(B2:D2<>0,),))

If this post helps click Yes
 
J

Jacob Skaria

Correction. Try the below. ... for "M"

=INDEX(A2:D2,MATCH(TRUE,INDEX(A2:D2<>"M",),))

If this post helps click Yes
 
D

Don Guillett

Do you need all 4, if there, or just the last one
This will find the item in the LAST filled column on row 1
=MATCH(999999,1:1)
 
J

Jacob Skaria

Using IF..
=IF(A2<>"M",A2,IF(B2<>"M",B2,IF(C2<>"M",C2,IF(D2<>"M",D2,"No values found"))))

If this post helps click Yes
 

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