Forum Discussion

Ebbulk's avatar
Ebbulk
Copper Contributor
Oct 01, 2019
Solved

Show feb 29th in leap years

Hi, I have a series of numbers (B6 till B36) containing numbers 1 till 31 for the days of the month. The last cell is dependent on cell M2 containing the word "januari, march, may...etc" for showing ...
  • SergeiBaklan's avatar
    SergeiBaklan
    Oct 04, 2019

    Ebbulk 

    If I understood you correctly your data is like this

    In B6 you may use

    =IF((MONTH(DATE($K$2,MONTH(1&LEFT($M$2,3)),ROW()-ROW($B$5)))=MONTH(1&LEFT($M$2,3))),ROW()-ROW($B$5),"")

    and drag it down till B36. It works for any correct combination of year and month in K2 and M2 and skips 29, 30, 31 if there are no such days in year and month.

Resources