Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Display yesterday's date but only for weekdays?
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 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Display yesterday's date but only for weekdays?
Hi,
Try this. =WORKDAY(NOW(),-1) If you get a #MAME error then Tools|Addins and check the analysis toolpak. Mike "totalnatal" wrote: 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 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Display yesterday's date but only for weekdays?
=TODAY()-CHOOSE(WEEKDAY(TODAY()),2,3,1,1,1,1,1,1)
-- Gary''s Student - gsnu200859 "totalnatal" wrote: 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 |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Display yesterday's date but only for weekdays?
I hope you don't get a "MAME" error!
-- If this helps, please click the Yes button. Cheers, Shane Devenshire "Mike H" wrote: Hi, Try this. =WORKDAY(NOW(),-1) If you get a #MAME error then Tools|Addins and check the analysis toolpak. Mike "totalnatal" wrote: 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 |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Display yesterday's date but only for weekdays?
OOPS tpyos R'US
Mkie "Shane Devenshire" wrote: I hope you don't get a "MAME" error! -- If this helps, please click the Yes button. Cheers, Shane Devenshire "Mike H" wrote: Hi, Try this. =WORKDAY(NOW(),-1) If you get a #MAME error then Tools|Addins and check the analysis toolpak. Mike "totalnatal" wrote: 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 |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Display yesterday's date but only for weekdays?
Sorry if this posts twice but had a crash when I clicked Post
This depends on what days you do this for, if you only use the file Monday to Friday then =TODAY()-(MOD(TODAY(),7)=2)-1 If on the otherhand you might open the file on Sunday then the above will need to be modified. -- If this helps, please click the Yes button. Cheers, Shane Devenshire "totalnatal" wrote: 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 |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Display yesterday's date but only for weekdays?
On Jul 21, 3:38*pm, Shane Devenshire
wrote: Sorry if this posts twice but had a crash when I clicked Post This depends on what days you do this for, if you only use the file Monday to Friday then =TODAY()-(MOD(TODAY(),7)=2)-1 If on the otherhand you might open the file on Sunday then the above will need to be modified. -- If this helps, please click the Yes button. Cheers, Shane Devenshire "totalnatal" wrote: 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- Hide quoted text - - Show quoted text - Hey, Thanks, I think it works but was wondering how you constructed it, especially regarding the use of MOD function. Thanks |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Display yesterday's date but only for weekdays?
On Tuesday, July 21, 2009 6:08:02 PM UTC+5:30, Gary''s Student wrote:
=TODAY()-CHOOSE(WEEKDAY(TODAY()),2,3,1,1,1,1,1,1) -- Gary''s Student - gsnu200859 "totalnatal" wrote: 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 THIS WORKS :) ! |
#9
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Display yesterday's date but only for weekdays?
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Would like to add 20 working/weekdays to a date | Excel Discussion (Misc queries) | |||
Date, Weekdays | Excel Discussion (Misc queries) | |||
Subtracting weekdays from a date: | Excel Worksheet Functions | |||
count weekdays in a date range | Excel Worksheet Functions | |||
Date exclude weekdays | New Users to Excel |