Google Spreadsheet, finding the previous weekday

后端 未结 3 429
萌比男神i
萌比男神i 2021-01-21 18:50

In Google Spreadsheet, or excel if its the same, how do I find the last weekday of day D only if D is not a weekday itself.

I.E:

If D equals weekday = do         


        
3条回答
  •  后悔当初
    2021-01-21 19:42

    Another option may be:

    =IF(WEEKDAY(D1, 2) > 5, D1 - (WEEKDAY(D1, 2) - 5), D1)
    

提交回复
热议问题