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
 
See the answers in your other post from today and try not to double-post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top