IF/AND/OR Formula Help?

G

Guest

I have 4 columns:
Col B indicates if Trained - Yes = X, No = "" (blank)
Col D indicates Phase 1, 2, 3, 4, 5, or 6
Col E indicates Back-Up Phase 1, 2, 3, 4, 5, 6, or "" (blank)
In Col F I want a formula that will do the following:
If B2 contains an X, F2=0
If B2 is blank, and...
E2 is blank, F2=0
D2 is Less Than or Equal to E2, F2=D2
D2 is Greater Than E2, F2=E2

I have the following formula that works for everything EXCEPT those times
when F2 should equal E2 or 0: =IF(AND(OR(D2<=E2,D2=E2),B2=""),D2,"0")
Not sure where to go from here. Can you help?

Thank you!
Carol
I've got an if/and formula that is doing everything
 
P

PCLIVE

I don't know if this is what you want, but here is what I came up with based
on your request.

=IF(OR(B2="X",AND(B2="",E2="")),0,IF(D2<=E2,D2,IF(D2>E2,E2)))
 
G

Guest

Thanks Biff. This worked on all cells with the exception of those where the
amount in E2 was smaller than that in D2 - but not a problem, the formula
provided by "PCLIVE" worked. Thank you for responding!
 
T

T. Valko

This worked on all cells with the exception of those
where the amount in E2 was smaller than that in D2

Hmmm....

You sure about that?

It works fine on my end.

I compared my results to those using PCLIVE's formula and they are
identical.

Biff
 
G

Guest

Interesting. I have one row that looks like this:
ColB ColD ColE ColF
2 4 4
It should have returned 2! However, I have another row that has 5 in ColD
and 6 in Col E - it returned 5 as it should have. Very odd.

I did discover a mistake in my request. I had stated that if B2 & E2 was
blank, F2 should be 0. But that was wrong. F2 should have been E2. But
thanks to the information ya'll provided I was able to fix it myself.
(Feeling very smart now - thank you very much!)
 

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