Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

If cell does not = previous month

Posted on 2014-07-21
5
Medium Priority
?
245 Views
Last Modified: 2014-07-21
Hi, i have the formula to deal with previous month

=TEXT(DATE(2004,IF(MONTH(TODAY())-1>0,MONTH(TODAY())-1,12),1),"MMMM")

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
0
Comment
Question by:Seamus2626
  • 2
  • 2
5 Comments
 
LVL 19

Expert Comment

by:helpfinder
ID: 40208647
check my attached sample
sample.xlsx
0
 

Author Comment

by:Seamus2626
ID: 40208658
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
0
 
LVL 19

Accepted Solution

by:
helpfinder earned 2000 total points
ID: 40208682
Hi,
I put drop down menu into F5 cell and IF formula into H5. IF formula contains also your formula =TEXT(DATE(2004,IF(MONTH(TODAY())-1>0,MONTH(TODAY())-1,12),1),"MMMM")

Where are you entering formula?

Anyway I update the sample file - checkt row 10, so drop down is in F5, your formula in G5 and IF statement in H5
sample.xlsx
0
 

Author Closing Comment

by:Seamus2626
ID: 40208703
Perfect, thanks
0
 
LVL 24

Expert Comment

by:Steve
ID: 40208721
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" )
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question