FORMATTING DATES IN FORMULAS

T

The BriGuy

I have a coumn that I simply put dates into. What I want to do is if the
month and day = certain criteris then TRUE results, if not then FALSE. For
exaple the date listed is 6/30/06 so if the date is 6/30/any year then this
is a TRUE statement.

I know this is probably simple but I seldom use EXCEL.

Thanks
 
R

Ron Coderre

With
A2: (a date)

To return TRUE if the Month=June and the Day=30
try this:
B2: =TEXT(A2,"mmdd")="0630"

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
D

David Biddulph

If you want a TRUE/FALSE answer you don't need the IF() function.
Just use =AND(DAY(A1)=30,MONTH(A1)=6)
 
T

The BriGuy

I modified the

=IF(AND(DAY(A1)=30,MONTH(A1)=6),TRUE,FALSE)

slightly and used an OR instead to cover seberal dates but thisworked great.

I ended up with:

=IF(OR(MONTH(L6)=3,MONTH(L6)=6,MONTH(L6)=9,MONTH(L6)=12),AVERAGE(M6:M8),"")

Thanks
 
Top