Can you beat chat GPT on this question

Beau the dog

Board Regular
Joined
Mar 8, 2021
Messages
72
Office Version
  1. 365
Platform
  1. Windows
I may not be asking Chat GPT the right question, or in the right way. So I'm going to try here, as this forum has always come up with the right answer!

One Sheet1 in cells A1:L1 I have - Jan-2023, feb-2023, Mar-2023 and so on up to Dec-2023.
On Sheet2 I have a list of training course titles in cells V5:AC5 (8 titles). starting 3 rows below that (ignore the two rows just beneath the course titles) are dates in which these course are completed, each row represents one member of staff. There are also future dates added, in which courses are booked.

The challenge is....underneath the month dates in sheet1, to have a list of all the future training course titles that are booked underneath the correct month and year in Sheet1

For example, May-2023 would look like the example below, as there are two OLAT courses booked, and one Daily Check course booked in May 2023
Dec-2023 would look like the below, as one First aid course and one manual handling course are booked in the future

As always, any help would be greatly appreciated.

Sheet1
Jan-2023Feb-2023Mar-2023Apr-2023May-2023Jun-2023Jul-2023Aug-2023Sep-2023Oct-2023Nov-2023Dec-2023
OLATFirst Aid
OLATManual handling
Daily checks


Sheet2
OLATDriver hoursFirst aidDaily checksManual handlingLoad SecurityLoCITYBridge Strikes
55355555
20/03/202120/03/2023
02/05/2023
11/05/2023
21/04/202314/12/202415/12/2023
10/08/202320/11/2023
15/05/2023
 
Can you write here the formula that you use in G6?

=LET(Tutto,'Training Matrix'!$V$5:$AC$32,Uno,IF((Tutto<>"")*(IFERROR(IF(YEAR(Tutto)>2020,TRUE,FALSE),FALSE)),COLUMN(Tutto)-COLUMN(INDEX(Tutto,1,1))+1&"#"&Tutto,""),Tuno,TEXTJOIN("|",TRUE,Uno),cCol,TEXTSPLIT(Tuno,"#","|"),inMese,FILTER(cCol,TEXT(INDEX(cCol,0,2),"aaaa-mm")=TEXT(F$5,"aaaa-mm")),IFERROR(INDEX(INDEX(Tutto,1,0),1,INDEX(inMese,0,1)),"--"))
 
Upvote 0

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Why are you using "aaaa-mm" and not "yyyy-mm"?

That's how the formula came through when you first sent it? I just changed it and it just gave me blanks along the row.

I usually use date format dd/mm/yy

But for this I just wanted the month and year, as this was for the Spreadsheet dashboard
 
Upvote 0
You may display the date in your preferred format, regardless how the formulas use them
I guess the formula I suggested use "yyyy-mm", even thoug the XL2BB shows "aaaa-mm"

But let's try making it work
 
Upvote 0
You may display the date in your preferred format, regardless how the formulas use them
I guess the formula I suggested use "yyyy-mm", even thoug the XL2BB shows "aaaa-mm"

But let's try making it work

I just realized there are two aaaa-mm to change...which I have done and now it works!

Thank you so much, really appreciate your time and patience. You sir, are a legend!
 
Upvote 0
Let me amend the formula:
Excel Formula:
=LET(Tutto,Sheet2!$V$5:$AC$100,LForMonth,B1,Uno,IF((Tutto<>"")*(IFERROR(IF(YEAR(Tutto)>2020,TRUE,FALSE),FALSE)),COLUMN(Tutto)-COLUMN(INDEX(Tutto,1,1))+1&"#"&Tutto,""),Tuno,TEXTJOIN("|",TRUE,Uno),cCol,TEXTSPLIT(Tuno,"#","|"),inMese,FILTER(cCol,TEXT(INDEX(cCol,0,2),"yyyy-mm")=TEXT(LForMonth,"yyyy-mm")),IFERROR(INDEX(INDEX(Tutto,1,0),1,INDEX(inMese,0,1)),"--"))
This way you have only to adapt:
Rich (BB code):
Tutto, Sheet2!$V$5:$AC$100    'the area with the courses
LForMonth,   B1               'the date to look for
 
Upvote 0
Let me amend the formula:
Excel Formula:
=LET(Tutto,Sheet2!$V$5:$AC$100,LForMonth,B1,Uno,IF((Tutto<>"")*(IFERROR(IF(YEAR(Tutto)>2020,TRUE,FALSE),FALSE)),COLUMN(Tutto)-COLUMN(INDEX(Tutto,1,1))+1&"#"&Tutto,""),Tuno,TEXTJOIN("|",TRUE,Uno),cCol,TEXTSPLIT(Tuno,"#","|"),inMese,FILTER(cCol,TEXT(INDEX(cCol,0,2),"yyyy-mm")=TEXT(LForMonth,"yyyy-mm")),IFERROR(INDEX(INDEX(Tutto,1,0),1,INDEX(inMese,0,1)),"--"))
This way you have only to adapt:
Rich (BB code):
Tutto, Sheet2!$V$5:$AC$100    'the area with the courses
LForMonth,   B1               'the date to look for

I just realized there are two aaaa-mm to change...which I have done and now it works! So the original formula was perfectly fine, it was just me trying to muddle my way through it....poorly!

Thank you so much, really appreciate your time and patience. You sir, are a legend!
 
Upvote 0

Forum statistics

Threads
1,216,122
Messages
6,128,963
Members
449,480
Latest member
yesitisasport

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