LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Coding to show first _weekday_ prior to a date, when date calculation happens to fall on weekend?

I created a spreadsheet "date calculator" that has helped me
enormously in work. I'm with a legal firm's marketing dept and we
receive countless notices of events taking place at a local large
performance centre. My job is to send out an email each time to all
the lawyers so that they know what they can take clients to and then
alert my boss 3 weeks prior and then 1 week prior to get her feedback
on what action to take for each event based on the tickets requested
(or tickets not requested, as the case may be). The problem with this
is when the date returned falls on the weekend. I need for the
spreadsheet to return a weekday in all cases. So if the alert happens
to fall on a weekday, fine. But if it falls on a weekend, the
spreadsheet would need to offset that date to show the Friday just
previous to that weekend.

For example, there's an event on Sat Jan 29 2005 - the spreadsheet
returns Sat Jan 8th as 3 weeks before and Sat Jan 22 as 1 week before
as when I must update my boss. Any way to make the calculation return
the Friday before in this type of case??

The calculation is currently an easy one, I have the cell format to
show as a custom date of: ddd., mmm.dd.yyyy

And the 3 week code is:
=IF(B3<"",SUM(B3-21),"")

And the 1 week code is:
=IF(B3<"",SUM(B3-7),"")

Thanks much for any help!

 
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
Show prior year based on date in other cell Munchkin Excel Worksheet Functions 3 June 17th 09 07:44 PM
formual to determine if date falls on weekend, adjust date to Mond Bradley Excel Discussion (Misc queries) 4 November 21st 08 06:19 PM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Worksheet Functions 2 April 21st 06 02:50 AM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Discussion (Misc queries) 1 April 20th 06 10:03 PM
Validate date within range prior to calculation Natassja Excel Discussion (Misc queries) 1 January 24th 06 05:52 PM


All times are GMT +1. The time now is 07:28 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"