Dates in IF Function ?

Neveraliein

New Member
Joined
Jun 16, 2008
Messages
2
This is really getting to me because I'm sure it's simple.
In Row 1 we have months mmm
In Column A there are various dates dd/mmm/yy
We, ultimately, want columns to total so we know occurences per month. IF A2 = date in jan it will return value of 1 in B2.
We tried (in B2) =IF(AND(A2>31/12/2007,A2<30/1/2008),1,0)

Bet someone has asked this before, but I haven't found anything in previous posts.

Any assistance would be appreciated
Thanks
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hi N. . . and welcome to the board.

Perhaps try
Code:
=if(and(a2>date(2007,12,31),a2< date(2008,1,30)),1,0)<DATE(2008,1,30)),1,0)< p>
 
Upvote 0
Rather than testing each date separately you could use one formula that will count how many dates are in each month, e.g.

=SUMPRODUCT(--(TEXT(A2:A100,"mmm-yy")="jan-08"))

will count how many dates in A2:A100 fall in January 2008
 
Upvote 0

Forum statistics

Threads
1,214,430
Messages
6,119,443
Members
448,898
Latest member
drewmorgan128

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