Could you please explain the +34 in you formula?
Every month has a minimum of 4 Fridays so my suggested formula is in the form
=4+(Test)
The test returns either TRUE or FALSE and the formula evaluates to 5 or 4 accordingly.....we just need a test that will only be TRUE when there are 5 Fridays in a month.....
Whether that happens or not is determined by a combination of the number of days in the month and the start day of the month, i.e. if a month has 31 days then for it to contain 5 Fridays the month must start on a Wed, Thu or Fri.
Similarly if a month has 30 days then to have 5 Fridays it must begin on a Thu or Fri....a 29 day month must begin on a Friday...a 28 day month can't have 5 Fridays.
So we can use the weekday function to check this. If we check the WEEKDAY of the 2nd of the month, i.e. WEEKDAY(2&A2&B2) then when month has 31 days then WEEKDAY(2&A2&B2) must be 5, 6 or 7 for month to have 5 Fridays.
Similarly if month has 30 days then WEEKDAY(2&A2&B2) must be 6 or 7....and if month has 29 days WEEKDAY(2&A2&B2) must be 7.
...so we need a function that returns a 4 when month has 31 days, 5 when it has 30, 6 when it has 29 and 7 when it has 28.
If we have such a function we can use
=4+(function< WEEKDAY(2&A2&B2))
so that's where
=DAY((1&A2&B2)+34) comes in.
1&A2&B2 gives the 1st of the month, when we add 34 we get a date in the following month, if current month has 31 days then that will be 4th of the month, if current month has 30 days that'll give the 5th, 29 days gives the 6th and 28 days the 7th......so DAY just extracts the number, 4, 5, 6 or 7 and we have the finished formula
=4+(DAY((1&A2&B2)+34)< WEEKDAY(2&A2&B2))
The first part remains constant but the the 2nd part needs to be varied depending on the day of the week to count, as described in my previous post