Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Happy Gilmore
 
Posts: n/a
Default Set a date as a constant to work back from to show only weekdays

I would like to input one date as a constant and then apply a formaula in
other cells relating to this date to calculate back from but to "round" back
to only weekdays. For example if i type in a date of February 1st 2006 (a
Wednesday) and would like to calculate backwards automatically by eleven days
it is Sat Jan 21st 2006. I would like this to round back to the nearest
previous workday which would be the Friday.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Vito
 
Posts: n/a
Default Set a date as a constant to work back from to show only weekdays


Try

=WORKDAY(A1,-11)

Where A1 contains date to count back from, e.g. Feb 1, 06

You will need the Analysis Toolpak Addin Installed.


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=499256

  #3   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld
 
Posts: n/a
Default Set a date as a constant to work back from to show only weekdays

On Sun, 8 Jan 2006 21:46:27 -0600, Vito
wrote:


Try

=WORKDAY(A1,-11)

Where A1 contains date to count back from, e.g. Feb 1, 06

You will need the Analysis Toolpak Addin Installed.


The OP wanted to subtract 11 days, and then adjust for weekends. Your formula
gives a result of Tuesday, Jan 17, 2006 given his data; not the Friday, Jan 20,
2006 he specified.


--ron
  #4   Report Post  
Posted to microsoft.public.excel.misc
Wykedguy
 
Posts: n/a
Default Set a date as a constant to work back from to show only weekda



"Ron Rosenfeld" wrote:

On Sun, 8 Jan 2006 21:46:27 -0600, Vito
wrote:


Try

=WORKDAY(A1,-11)

Where A1 contains date to count back from, e.g. Feb 1, 06

You will need the Analysis Toolpak Addin Installed.


The OP wanted to subtract 11 days, and then adjust for weekends. Your formula
gives a result of Tuesday, Jan 17, 2006 given his data; not the Friday, Jan 20,
2006 he specified.


--ron


Try this

a1 Date ( 1st Feb )
a2 No Days (-11)
a3 Result (23rd Feb)
a4 formula =IF(WEEKDAY(C1)=1,C1-2,IF(WEEKDAY(C1)=7,C1-1,C1))

This checks if result is a Sun and takes 2 days of or Sat and takes one day
off, otherwise result is a workday.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
the date format is not working ,sort by date doesn't work. Rosa Campos Excel Discussion (Misc queries) 1 September 12th 05 10:52 PM
Converting Date to Work Week... PokerZan Excel Discussion (Misc queries) 4 September 1st 05 09:47 PM
How do I format column containing date and time to only show the . ColoradoKid Excel Discussion (Misc queries) 5 December 18th 04 05:25 PM
Roll back to previous date Jay Excel Worksheet Functions 2 December 3rd 04 03:35 PM
Show a date based on today DJ Dusty Excel Worksheet Functions 2 November 12th 04 03:20 AM


All times are GMT +1. The time now is 05:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"