If date is current month - true/false

nielf

Board Regular
Joined
Nov 13, 2012
Messages
69
Hi,

I'm trying to use an IF formula to return true of false if the date in AM2 is the current month.

I have found a formula that works for the current day:

Code:
=IF(TODAY()=INT(AM2);TRUE;FALSE))

However, I can figure out how to get it working for the current month. I have tried this but the formula contains too many arguments.

Code:
=IF(MONTH(TODAY()=INT(AM2);TRUE;FALSE)
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi,

Try if(Month(Now()=Month(AM2),True,False)

I tried the formula but I still get his error:

nt3vUY2.png
 
Upvote 0
My Bad,

=If(Month(Now())=Month(AM2),True,False) I missed a 2nd ) after Now
 
Upvote 0
This will suffice :-
Code:
=MONTH(NOW())=MONTH(AM2)

to give the required result.

hth
 
Upvote 0
We're almost there now.

The only thing is that the formula doesn't take the current year into account. It shows TRUE for all dates which are in May no matter what year.
 
Upvote 0
We're almost there now.

The only thing is that the formula doesn't take the current year into account. It shows TRUE for all dates which are in May no matter what year.
Give this formula a try...

=TEXT(A1,"mmmyyyy")=TEXT(NOW(),"mmmyyyy")
 
Upvote 0
Give this formula a try...

=TEXT(A1,"mmmyyyy")=TEXT(NOW(),"mmmyyyy")

The issue seems to be the same with all the formulas. The month is correct but it is not limited to the current year (2015). I might not have been clear on that.

=TEXT(A1,"mmmyyyy")=TEXT(NOW(),"mmmyyyy"

=MONTH(NOW())=MONTH(AM2)

=If(Month(Now())=Month(AM2),True,False)

I have uploaded a spreadsheet with all the formulas here.
 
Last edited:
Upvote 0
Your bad
You didn't mention year in your OP so I didn't take it into account.

=IF(AND(MONTH(NOW())=MONTH($Am$2),YEAR(NOW())=YEAR($AM$2)),True,False)

<COLGROUP><COL style="WIDTH: 374pt; mso-width-source: userset; mso-width-alt: 18249" width=499><TBODY>
</TBODY>
 
Upvote 0
What is the value in AM2? What is the cell number formatting of AM2?

It may help using specific values and examples to get the correct answer; otherwise Rick's answer should work, as should:
Code:
=AND(MONTH(NOW())=MONTH($AM$2),YEAR(NOW())=YEAR($AM$2))
 
Upvote 0

Forum statistics

Threads
1,221,622
Messages
6,160,887
Members
451,676
Latest member
Assy Bissy

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