Solved

If cell does not = previous month

Posted on 2014-07-21
5
232 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 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

762 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now