count months looking at a list of dates

psrs0810

Well-known Member
Joined
Apr 14, 2009
Messages
1,109
I need a formula that will tell me the number of month based on the list of dates:
e.g.
10/10/2014
10/24/2014
11/7/2014
11/21/2014
12/5/2014
12/19/2014
1/2/2015
1/16/2015
1/30/2015
2/13/2015
2/27/2015
3/13/2015
3/27/2015
4/10/2015
4/24/2015
5/8/2015
5/22/2015
6/5/2015
6/19/2015

I want to know that I have 9 months

<tbody>
</tbody><colgroup><col></colgroup>
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
It now seems I may have misunderstood the requirement.
Not necessarily, I could see drawing either conclusion based on the information given.
More complete issue description would help determine which method is better suited to the task.
 
Upvote 0
This is a solution like the one Mike posted (in Norwegian):

=SUMMER(HVIS(FREKVENS(B2:B8;B2:B8)>0;1;0))

This formula counts how many unique months you got in your list after doing what you did in my last post.
 
Upvote 0
bascually I am looking for is a formula that I will have a starting point that is going to calculate out every two weeks. It may go for 6 months to 16 months.
so if my starting point is 9/5/2014 and I see every two weeks ending 6/26/2015, I would want to know that there were 10 months in that timeframe
 
Upvote 0
It may go for 6 months to 16 months.
That eliminates Mike's solution, his would top out at 12.

And given that the dates are every 2 weeks, then there would be 0 months NOT included in the list.
So using the earliest date to the latest date should be an accurate count.

Test the last one in post #11
 
Upvote 0
You're welcome.

One last thing to note about the formula,
Make sure there are no 0's in the list of dates, you would get a hugely inaccurate result.
Blanks are ok, but no 0's.
 
Upvote 0
FWIW This "array formula" will count the number of different months represented, it doesn't matter if there are gaps or if the dates are in different years

=SUM(IF(FREQUENCY(AE10:AE31,AE10:AE3-DAY(AE10:AE3)+1),1))

confirm with CTRL+SHIFT+ENTER
 
Upvote 0

Forum statistics

Threads
1,215,212
Messages
6,123,654
Members
449,113
Latest member
Hochanz

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