Monter IF statement??? sorry long question

S

Steve

I am setting up a spreadsheet to do some stats and am lost on a large
if,and,or type statement

The columns are
E=Start of period
F=end of period
H=Completed
Q=Target achivied
N=Waived
O=Deferred
M=FTA
P=Exit

U=Exit

The other columns dont really matter as they wont affect what i want

The Result in Col Q needs to Be Pass or Fail

The scenario is as follows.

If the interivew is completed within the target window (E-F) we pass
If we waive the interview (N) we pass
IF we FTA the interview (M) we fail unless there is an entry between E-F in
completed (H)
If we Defer the interview outside the target window we fail but if it is
inside & we complete the interview we pass
If we Exit (P) thne i want no entry at all in Col Q

i think that is all. I got so far then gave up. If i cnt do one large
statement should i do lots of little ones with outcomes in hidden columns?

hopefully this makes sense
 
D

David Biddulph

Try this as a start:
=IF(OR(AND(H2>=E2,H2<=F2),N2="Waived"),"Pass",IF(OR(M2="FTA",O2="Deferred"),"Fail",IF(P2="Exit","","undefined")))
If the content of your columns is different from what I've assumed, you can
adjust the formula accordingly.
 
S

Steve

The columns will all have dates in and i need to get it to check if they are
between the dates in E & F so the beginning of the formulea is fine buts
after that is where i started to get stuck
 
D

David Biddulph

So if you need to check if a date is between E & F, use something like
AND(H2>=E2,H2<=F2), but if there are parts where you merely want to check
whether a cell has an entry, you could use something like N2<>""
 
S

Steve

sorry am being a bit thick so if i remove the bit that says for example
M2="FTA" and replace it will M2=<>"" that should work and just look for any
entry in that cell?
 
D

David Biddulph

Yes, try it.
--
David Biddulph

Steve said:
sorry am being a bit thick so if i remove the bit that says for example
M2="FTA" and replace it will M2=<>"" that should work and just look for
any
entry in that cell?
 
R

Rick Rothstein \(MVP - VB\)

Okay, assuming I have understood the conditions you posted, give this
formula a try...

=IF(OR(P2<>"",E2=""),"",IF(OR(N2<>"",AND(H2>=E2,H2<=F2),AND(O2>=E2,O2<=F2,H2<>"")),"Pass","Fail"))

Note that, as I have constructed it, there is no test for FTA. Unless I
misread your conditions, FTA is immaterial as your other conditions will
force a failure notice with or without the FTA column; and the only time the
FTA column will force a Pass is when you already have a Pass because the
Completed column met its own Pass conditions.

Rick
 
S

Steve

I need the FTA to make it fail as well as the others unless they complete
durig the target period
 
R

Rick Rothstein \(MVP - VB\)

Unless I am missing something about your condition, I don't see where it
comes into play. It seems like you are saying that the only time FTA will
make a Pass is if H2 (Completed) is between E2 and F2 (Start and End dates),
otherwise it make a False. But if H2 is between E2 and F2, that is the first
condition you listed for Pass.. so, if H2 is between E2 and F2, we have a
Pass no matter what is in FTA. The way I set the formula up, I test for the
things that make a Pass, otherwise it gives a Fail. Again, unless I am
misreading your conditions, that means FTA doesn't factor into the formula
at all (as I have constructed it).

Rick
 

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