Solved

If cell does not = previous month

Posted on 2014-07-21
5
240 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

752 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