IF formula

C

Connie Martin

I need a formula that will likely be simple enough for all you gurus out
there, but beyond what I have mastered yet in Excel. Here it is:

Columns J and K are dates, so....In column L it should have this formula:
If K is an earlier date that J, results "EARLY"
If K is later than J, results "LATE"
If there is nothing in K, results "ON TIME"

Thank you in advance
Connie
 
D

Duke Carey

Your statement, and Don's answer, both ignore K=J.

If "On Time" is the answer ONLY when K is blank, then

=if(k2="","On Time",if(K2>j2,"Late","Early"))

In this formula, when K=J you'll get "Early" as a result.

=if(or(k2=j2,k2=""),"On Time",if(K2>j2,"Late","Early"))

In this case you'll get "On Time" when K=J
 
C

Connie Martin

Thank you for replying. I'm heading home now for the day. Will look at this
in the a.m. Please check back then. Connie
 
D

Don Guillett

happy now? <G> Assumes that K will be entered last and accounts for the
"dreaded space bar"
=IF(LEN(K2)<2,"",IF(K2<J2,"e",IF(K2>J2,"L","O")))
 
C

Connie Martin

Sorry to say, but none of this works.

Don Guillett said:
happy now? <G> Assumes that K will be entered last and accounts for the
"dreaded space bar"
=IF(LEN(K2)<2,"",IF(K2<J2,"e",IF(K2>J2,"L","O")))
 
D

Duke Carey

Golly it's hard to diagnose "none of this works" Do you think you can spare
a few facts?
 
D

Don Guillett

Perhaps your dates are not really dates???? maybe show us. Mind reading is
extra.
 
C

Connie Martin

Okay, you guys are real funny! :) Sorry for the delay in getting back here.
It's just been so busy. Anyway, my dates are in date format. Here is a
sample. The third column is what the formula SHOULD yield.

Feb-08-06 Feb-02-06 Early
Feb-06-06 On Time
Feb-01-06 On Time
Feb-17-06 Jan-31-06 Early
Feb-01-06 Feb-06-06 Late

Connie
 
C

Connie Martin

BINGO! Thank you! That works! Too bad when we copy and paste columns in
these messages that they wouldn't stay the way we paste them. I see what I
pasted is all bunched together, which it wasn't when I sent it. But you were
able to decipher it anyway, thank goodness! Thanks again. Connie
 
Top