Get the Correct Month

MrDB4Excel

Active Member
Joined
Jan 29, 2004
Messages
348
Office Version
  1. 2013
Platform
  1. Windows
Cell AA4’s formula is =IFERROR(LOOKUP(2,1/(B4:Y4<>""),B4:Y4),"xx")
Cells B2:Y2 indicate a specific month an action was performed per the result in AA4.
When the value in AA4 comes from October then the value in AD4 should read October.
When the value in AA4 comes from November then the value in AD4 should read November, this I have not been able to figure out how to do.
So basically any value in column AM needs to get the correct month for the date value in column AP based upon which month column the Action was last done.
1st, 2nd, 3rd, 4th, 5th, & 6th indicate which week of the month the indicated date occurs within. This is done because in some months no action occurs in any given week of the month as indicated by the Xl2bb Mini Sheet. And in some months any given action may occur in more than one week of the month thus the need for a separate column for each week of the month.
As you can see in the Xl2bb Mini Sheet some values in the November range, 2nd week, do not give correct results in Column AD.
I have explored multiple methods and just can’t seem to find a good method.
Perhaps I don’t have enough if statements.
Any help will be much appreciated.
Following this description you will find two Mini Sheets. The second Mini Sheet is simply the calendar.

BogusSchedule2024_Chngs.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG
2SeptemberOctoberNovemberDecemberNovember 06, 202411October6October
31st2nd3rd4th5th6th1st2nd3rd4th5th6th1st2nd3rd4th5th6th1st2nd3rd4th5th6th2024November11/6/2024
4Action 0172828October 28, 2024October 28, 2024
5Action 0216279182866November 28, 2024November 28, 2024
6Action 0316279182877October 28, 2024
7Action 0416279182866November 28, 2024
8Action 0562488October 28, 2024246$K$8
9Action 06168182855October 28, 2024
10Action 071818October 28, 2024
11Action 081699October 28, 2024
12Action 098182855October 28, 2024
13Action 108182855October 28, 2024
14Action 11xx 
Sheet1
Cell Formulas
RangeFormula
AA2AA2=TEXT($AD$3&" "&AA5&", "&$AA$3,"mmmm dd, yyyy")
AB2AB2=MONTH(AE3)
AG2AG2=TEXT(EOMONTH(TODAY(),-1),"mmmm")
AE2AE2=DAY(AE3)
AE3AE3=TODAY()
AG4AG4=TEXT($AD$2&" "&$AA4&", "&$AA$3,"mmmm dd, yyyy")
AG5AG5=TEXT($AD$3&" "&$AA4&", "&$AA$3,"mmmm dd, yyyy")
AE8AE8=MAX($B$8:$Y$8)
AF8AF8=OFFSET($K$8,0,-2)
AG8AG8=CELL("address",INDEX($B$8:$Y$8,MATCH(MAX($B$8:$Y$8),$B$8:$Y$8,0)))
AA4:AA14AA4=IFERROR(LOOKUP(2,1/(B4:Y4<>""),B4:Y4),"xx")
AD2AD2=TEXT(TODAY()-DAY(TODAY()),"mmmm")
AD3AD3=TEXT($AB$2*29,"mmmm")
AD4:AD14AD4=IF($AA4="xx","",IF($AA4<>$AE$2,$AG$4,IF($AA4=$AE$2,$AG$5)))


The second Mini Sheet must appear in a follow-up to this post as I received the message "Generated content exceeds the limit..."
 
I already instituted a solution as seen in Post #3
.. and post #10 I guess.

As I mentioned at the start of post #4, I was just offering a way to get the same results without all the helper cells and header changes.
If you did not want to repeat all those month headings or use helper columns ..

So, if post #3 or post #10 is your preferred solution, then perhaps you could mark one of those as the solution post - certainly not #6.
 
Upvote 0

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,224,815
Messages
6,181,135
Members
453,021
Latest member
Justyna P

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