Listing Months within a range of Dates

SeliM

New Member
Joined
Aug 10, 2023
Messages
48
Office Version
  1. 365
Platform
  1. Windows
Thanks for reading this question.
I have a range of dates associated with audits within a health service. (in this case a range of questions on safety and quality).

The audits are conducted with no specific timeframe requirements hence they can occur in any month and can have months in between (for example last audits were in November 23 next audit was February 24)

I'm trying to find a way to list the months for the year as they occur, many of the formulae assume there is a constant sequence.

Would you have some advice to guide me please.

Geoff
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
From reading that description I have no idea what your original data looks like or what the final result should look like.
Can you show us some small "before" sample data and the corresponding "after" result with XL2BB?
 
Upvote 0
Thanks for taking the time.
Apologies I have never been able to have XL2BB function on my machine - simply refuses!

Simple data line:
Dates
14/01/2023​
28/01/2023​
20/02/2023​
16/04/2023​
9/10/2023​
1/11/2023​
11/01/2024​
14/01/2024​
9/05/2024​
File TypeCHSPDiabetes EDCHSPDiabetes EDSocial SupportCommunity NurseSocial SupportSocial SupportSocial Support

Year Months:
2023 January
2023 February
2023 April
2023 October
2023 November
2024 January
2024 March
2024 May

Then I can list File Type occasions for each Month (Year) in the data set
CHSP
Year Month Occasions
2023 January 1
2023 February 1

Social Support
Year Month Occasions
2023 October 1
2024 January 2
2024 May 1

Etc.
I have experimented with Sumproduct but due to lack of skill I have to list all months of the year which I'm trying to avoid. Trust this makes sense and suffices. Many thanks Geoff
 
Upvote 0
not sure whether this what you want:
工作簿1.xlsx
ABCDEFGHIJK
1Dates2023-01-142023-01-282023-02-202023-04-162023-10-92023-11-12024-01-112024-01-142024-05-09
2File TypeCHSPDiabetes EDCHSPDiabetes EDSocial SupportCommunity NurseSocial SupportSocial SupportSocial Support
3
4
5CHSPDiabetes EDSocial SupportCommunity Nurse
6Year Month OccasionsYear Month OccasionsYear Month OccasionsYear Month Occasions
72023 January 12023 January 12023 October 12023 November 1
82023 February 12023 April 12024 January 2
92024 May 1
10
11
12
13
14
15
16
17
18
19
20
Sheet1
Cell Formulas
RangeFormula
C5:F9C5=IFNA(DROP(REDUCE(0,UNIQUE(B2:J2,1),LAMBDA(x,y,HSTACK(x,VSTACK(y,"Year Month Occasions",LET(s,FILTER(TEXT(B1:J1,"e mmmm"),B2:J2=y),MAP(UNIQUE(TOCOL(s)),LAMBDA(z,z&" "&SUM(N(s=z))))))))),,1),"")
Dynamic array formulas.
 
Upvote 0
Thank you.
This is code well beyond my capacity. I have it working in the actual workbook now I'm wondering how to have the "pieces" of data in separate columns.

Many thanks for your assistance.

:)
Geoff
 
Upvote 0
Thank you.
This is code well beyond my capacity. I have it working in the actual workbook now I'm wondering how to have the "pieces" of data in separate columns.

Many thanks for your assistance.

:)
Geoff
Referring to Peter's suggestion, in order to facilitate a quick and effective resolution of your issue, you can use XL2BB to upload source data and texpected result.
 
Upvote 0
@SeliM
Please do not mark as the solution a post that does not contain one. I have removed the solution mark from post 5 as it clearly is not an answer the the thread question. :)
 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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