• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Wat did I forgot in this formula?

Belleke

Well-Known Member
=IF(WEEKDAY(TODAY(),2)=6,TODAY()-1) IF(WEEKDAY(TODAY(),2)=7,TODAY()-2)
I want to combine these 2 so that if it is weekend cell always returns last friday
 
Wat did I forgot in this formula?
What ? The Excel logic … Even if the way to go is post #2​
according to your logic your formula should be like =TODAY()-IF(WEEKDAY(TODAY(),2)>5,WEEKDAY(TODAY(),16),0) or​
=IF(WEEKDAY(TODAY(),2)=6,TODAY()-1,IF(WEEKDAY(TODAY(),2)=7,TODAY()-2,TODAY())) …​
 
Maybe

Try this old formula, without Weekday or Workday function

=TODAY()-SUM((MOD(TODAY(),7)+1={1,2})*{1,2})

or

=TODAY()-MID(1200000,MOD(TODAY(),7)+1,1)
 
Last edited:
=IF(WEEKDAY(TODAY())=7,TODAY()-1);IF(WEEKDAY(TODAY())=1,TODAY()-2;TODAY()))

=TODAY()-WEEKDAY(TODAY(),2)+LOOKUP(WEEKDAY(TODAY(),2),{1;2;3;4;5})
 
Last edited:
Back
Top