if formula help

plost33

Well-known Member
Joined
Oct 2, 2008
Messages
866
i am wanting an if formula that will look at a cell and if the date in that is in the current month then it should return "yes" and return "no" if that date is not in the current month.

example:

cell A1 = 4/21/2011

this if formula is in cell A2. it should return "no" because 4/21/2011 is not in the current month of June 2011.

hope someone can help.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Need to analysis Tool pak addin installed
=IF(AND(A1 > EOMONTH(Today(),-1),A1 < EOMONTH(Today(),0)),"yes","no")<EOMONTH(NOW(),0)),"YES","NO")<EOMONTH(NOW(),0)),"YES","NO")<EOMONTH(NOW(),0)),"YES","NO")[ CODE]<EOMONTH(NOW(),0)),?YES?,?NO?)< p>
 
Last edited:
Upvote 0
i am wanting an if formula that will look at a cell and if the date in that is in the current month then it should return "yes" and return "no" if that date is not in the current month.

example:

cell A1 = 4/21/2011

this if formula is in cell A2. it should return "no" because 4/21/2011 is not in the current month of June 2011.

hope someone can help.

Try...

=IF(A1-DAY(A1)+1=TODAY()-DAY(TODAY())+1,"Yes","No")

This does not check whether there is a date in A1, but that can be added...

=IF(N(A1),IF(A1-DAY(A1)+1=TODAY()-DAY(TODAY())+1,"Yes","No"),"")
 
Upvote 0
It's really important to post the version of Excel you're using so we can offer version compatible suggestions.

This regular formula works in all versions:
Code:
B1: =IF((A1-DAY(A1))=(TODAY()-DAY(TODAY())),"yes","no")

Does that help?
 
Upvote 0
Need to analysis Tool pak addin installed
=IF(AND(A1 > EOMONTH(Today(),-1),A1 < EOMONTH(Today(),0)),"yes","no")<EOMONTH(NOW(),0)),"YES","NO")<EOMONTH(NOW(),0)),"YES","NO")<EOMONTH(NOW(),0)),"YES","NO")[ CODE]<EOMONTH(NOW(),0)),?YES?,?NO?)< p>


Disregard this one. It fails on the last day of the month. :(
 
Upvote 0
okay guys thanks. now to take it one step furthure:

if the date in A1 is no in the current month i want to return the first day of the current month....
 
Upvote 0
okay guys thanks. now to take it one step furthure:

if the date in A1 is no in the current month i want to return the first day of the current month....

Try...

=IF(A1-DAY(A1)+1=TODAY()-DAY(TODAY())+1,"Yes",TODAY()-DAY(TODAY)+1)

If you record today's date in a cell of its own, say, in E1...

=IF(A1-DAY(A1)+1=E1-DAY(E1)+1,"Yes",E1-DAY(E1)+1)
 
Upvote 0
aladin, that does not seem to work. my date in a1 is 5/24/2011. this formula should return 6/1/2011 because it is the first day of the following month.
 
Upvote 0
FORMULA IS CLOSE TO WORKING. IT IS JUST THE LAST PART THAT IS NOT. I NEED A FORMULA THAT WILL TAKE ANY DATE AND RETURN THE FIRST DAY OF THE NEXT MONTH. that is the final part i need to complete it.
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,894
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top