Seamus2626
asked on
If cell does not = previous month
Hi, i have the formula to deal with previous month
=TEXT(DATE(2004,IF(MONTH(T ODAY())-1> 0,MONTH(TO DAY())-1,1 2),1),"MMM M")
I have a drop down in cell F5 that has a list of months
I want an if statement in cell H5 which says, if the drop down does not equal the previous month, "You are dealing with incorrect month"
Thanks
=TEXT(DATE(2004,IF(MONTH(T
I have a drop down in cell F5 that has a list of months
I want an if statement in cell H5 which says, if the drop down does not equal the previous month, "You are dealing with incorrect month"
Thanks
ASKER
Helpfinder, if i select Jun on the dropdown, and enter your formula, i still get
"You are dealing with incorrect month"
Whereas i would be dealing with the correct month i.e. current month - 1
Thanks
"You are dealing with incorrect month"
Whereas i would be dealing with the correct month i.e. current month - 1
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect, thanks
Seamus, your formula for previos month seems a tad complicated for your needs:
Last day of previous month = TODAY() - DAY(TODAY())
So previous month = TEXT( TODAY() - DAY( TODAY() ) , "mmmm" )
Last day of previous month = TODAY() - DAY(TODAY())
So previous month = TEXT( TODAY() - DAY( TODAY() ) , "mmmm" )
sample.xlsx