Display yesterday's date but only display weekdays?

  • Thread starter Thread starter totalnatal
  • Start date Start date
T

totalnatal

Hi,

I have the following function : =TODAY()-1

The problem is that if we're monday it gives me sunday's date whereas
I only want weekdays so in this case friday.

Any idea on how to mod the function to do that?

thanks
 
Try

=TODAY()-IF(WEEKDAY(TODAY(),1)=2,3,1)

That needs to be changed to

=TODAY()-IF(WEEKDAY(TODAY(),1)<=2,3,1)

if you will ever need to use the workbook on a Sunday.

HTH,
Bernie
MS Excel MVP
 
Oops....if you need to work on weekends, then use

=TODAY()-IF(WEEKDAY(TODAY(),1)<=2,WEEKDAY(TODAY(),1)+1,1)

The WORKDAY function may require the Analysis ToopPak, that not all people will have installed.

HTH,
Bernie
MS Excel MVP
 
Back
Top