Instant Calendar

The Spreadsheet Page by John Walkenbach http://j-walk.com/ss/

Enter as array formula in 6 rows x 7 columns (Push Ctrl, Shift and Enter simultaneously)

=IF(MONTH(DATE(YEAR(NOW()),MONTH(NOW()),1))<>MONTH(DATE(YEAR(NOW()),MONTH(NOW()),1)-(WEEKDAY(DATE(YEAR(NOW()),MONTH(NOW()),1))-1)+{0;1;2;3;4;5}*7+{1,2,3,4,5,6,7}-1),"",DATE(YEAR(NOW()),MONTH(NOW()),1)-(WEEKDAY(DATE(YEAR(NOW()),MONTH(NOW()),1))-1)+{0;1;2;3;4;5}*7+{1,2,3,4,5,6,7}-1)

You have to format cells as "d" so they appear as days.

This is my version. It also must be entered as an array formula in 6 rows x 7 columns (Push Ctrl, Shift and Enter simultaneously) No special formatting is required.

For Sundays

=IF({1;2;3;4;5;6}*7+{1,2,3,4,5,6,7}-WEEKDAY(DATE(YEAR(NOW()),MONTH(NOW()),1))-6<1,"",IF({1;2;3;4;5;6}*7+{1,2,3,4,5,6,7}-WEEKDAY(DATE(YEAR(NOW()),MONTH(NOW()),1))-6>DAY(DATE(YEAR(NOW()),MONTH(NOW())+1,0)),"",{1;2;3;4;5;6}*7+{1,2,3,4,5,6,7}-WEEKDAY(DATE(YEAR(NOW()),MONTH(NOW()),1))-6))

For Mondays
=IF({1;2;3;4;5;6}*7+{1,2,3,4,5,6,7}-WEEKDAY(DATE(YEAR(NOW()),MONTH(NOW()),1),2)-6<1,"",IF({1;2;3;4;5;6}*7+{1,2,3,4,5,6,7}-WEEKDAY(DATE(YEAR(NOW()),MONTH(NOW()),1),2)-6>DAY(DATE(YEAR(NOW()),MONTH(NOW())+1,0)),"",{1;2;3;4;5;6}*7+{1,2,3,4,5,6,7}-WEEKDAY(DATE(YEAR(NOW()),MONTH(NOW()),1),2)-6))



© Copyright andrewsexceltips.net All Rights Reserved.