Not using merge cells (which is horrible anyway), but for your case you could far better anyway. This will take a bit of setting up but gives exactly the effect you want.
Have a column (A) for month but simply repeat the date in it (A2: =C2). Don't calculate the month here, we want to retain the date so you can simply format to show month only later.
For column B weeks, use WEEKNUM(C2,2) to calculate ISO weeks (Monday = day 1)
Copy these formulas down A and B as far as needed.
Format both of these columns to use a custom number format of ;;; this means all those values completely disappear, and we will bring them back selectively using conditional formatting.
For column A you need to see the month name if:
- this is the first row, and after the 15th of the month
- this is the last row, and before the 15th of the month
otherwise (normally) show the month name against the 15th as roughly the middle of the month.
So, you need to apply a condition to cells A2:A999 (or whatever the length of your column is) as follows:
=OR(AND($C1=$C$1,DAY($C2)>15),AND($C3="",DAY($C2)<15),DAY($C2)=15)
Note the first condition checks if the current row date = "whatever the label of your date column is" rather than hardcoding as ="Date" or somesuch.
Set the format for these to use a custom number format of "MMM" (three letter months), or whatever is your preference.
For weeknumbers, these should show similarly on days at the top or bottom of the list, or normally on Thursdays (visually this is mid-week if you have Mon=1, but if you want them against Wednesdays instead as "mid-week" day, use 3 instead of 4 in formula below). Apply conditional format by formula:
=OR(AND($C1=$C$1,WEEKDAY($C2,2)>4),AND($C3="",WEEKDAY($C2,2)<4),WEEKDAY($C2,2)=4)
And use a suitable number format (0 or 00 probably best)
To alternate background colours, use the same sort of approach - colour them all then conditionally colour some back again. So colour all the cells with a light background fill then use conditional formats to colour them darker (or vice versa) based on the value of these columns is "even" ie formula for weeks is something like:
=MOD(B2,2)=0
or in the case of months include the MONTH calculation ie condition uses
=MOD(MONTH(A2),2)=0
Do this separately for months and weeks.
It should now look something like the below image.
Hope this helps!
