#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Date Functions

How do I get Excel to return a date Rounded back 2 Mondays based on the date
I give it. Example. If I give it todays date which is 4/16/08 I need it to
return 4/7/08. The trick is I need it to return that 4/7/08 date regardless
if I input 4/14/08-4/18/08. (I need it to round back 2 Mondays.)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 141
Default Date Functions

On Apr 16, 10:14*pm, Sean.rogers
wrote:
How do I get Excel to return a date Rounded back 2 Mondays based on the date
I give it. Example. If I give it todays date which is 4/16/08 I need it to
return 4/7/08. The trick is I need it to return that 4/7/08 date regardless
if I input 4/14/08-4/18/08. (I need it to round back 2 Mondays.)


Hi Sean,

Try this maybe:

=D3-WEEKDAY(D3,3)-7

Assuming your date is in cell D3.

Cheers,
Ivan.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Date Functions

On Wed, 16 Apr 2008 05:14:01 -0700, Sean.rogers
wrote:

How do I get Excel to return a date Rounded back 2 Mondays based on the date
I give it. Example. If I give it todays date which is 4/16/08 I need it to
return 4/7/08. The trick is I need it to return that 4/7/08 date regardless
if I input 4/14/08-4/18/08. (I need it to round back 2 Mondays.)



=A1-6-WEEKDAY(A1-1)

You didn't specify Sat/Sun, but they, too, will go back 2 Mondays -- In other
words, 4/14/08-4/20/08 will return 4/7/08

--ron
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Date Functions

Thank you. It work beautifully. One more question. I am self tought in Excel
so can you please explane the Logic in this function?

"Ron Rosenfeld" wrote:

On Wed, 16 Apr 2008 05:14:01 -0700, Sean.rogers
wrote:

How do I get Excel to return a date Rounded back 2 Mondays based on the date
I give it. Example. If I give it todays date which is 4/16/08 I need it to
return 4/7/08. The trick is I need it to return that 4/7/08 date regardless
if I input 4/14/08-4/18/08. (I need it to round back 2 Mondays.)



=A1-6-WEEKDAY(A1-1)

You didn't specify Sat/Sun, but they, too, will go back 2 Mondays -- In other
words, 4/14/08-4/20/08 will return 4/7/08

--ron

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Date Functions

If you type the word WEEKDAY into Excel help, it'll tell you the syntax of
the WEEKDAY function, and give examples. The same applies for any other
Excel function which is confusing you (except for DATEDIF).
--
David Biddulph

"Sean.rogers" wrote in message
...
Thank you. It work beautifully. One more question. I am self tought in
Excel
so can you please explane the Logic in this function?

"Ron Rosenfeld" wrote:

On Wed, 16 Apr 2008 05:14:01 -0700, Sean.rogers
wrote:

How do I get Excel to return a date Rounded back 2 Mondays based on the
date
I give it. Example. If I give it todays date which is 4/16/08 I need it
to
return 4/7/08. The trick is I need it to return that 4/7/08 date
regardless
if I input 4/14/08-4/18/08. (I need it to round back 2 Mondays.)



=A1-6-WEEKDAY(A1-1)

You didn't specify Sat/Sun, but they, too, will go back 2 Mondays -- In
other
words, 4/14/08-4/20/08 will return 4/7/08

--ron





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Date Functions

On Wed, 16 Apr 2008 06:54:00 -0700, Sean.rogers
wrote:

Thank you. It work beautifully. One more question. I am self tought in Excel
so can you please explane the Logic in this function?


=A1-6-WEEKDAY(A1-1)

The basic idea is that, with a date in A1, the formula

A1-WEEKDAY(A1) will return the previous Saturday.

Actually, A1-WEEKDAY(A1-DOW) returns the previous Saturday, where DOW = Day Of
Week and Sunday = 1; Saturday = 7. But, of course, WEEKDAY(A1) =
WEEKDAY(A1-7), so both are the same.

DOW becomes important when you want to return a different day than Saturday.

So, to return the Monday of the week befo

=A1-6-WEEKDAY(A1-6-DOW) --
A1-6-WEEKDAY(A1-6-2) --
A1-6-WEEKDAY(A1-8)

Since the weekdays are 1-7 --
A1-6-WEEKDAY(A1-MOD(8,7)) --
A1-6-WEEKDAY(A1-1)

--ron
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
Date functions Dianethetech Excel Worksheet Functions 4 May 17th 07 04:31 PM
Date Functions mark.nelson4 Excel Worksheet Functions 7 January 3rd 07 10:47 PM
Date Functions Jules Excel Discussion (Misc queries) 4 July 5th 06 05:55 PM
Date Functions Keith Excel Discussion (Misc queries) 2 April 24th 06 06:43 PM
date functions VDan Excel Discussion (Misc queries) 1 August 31st 05 06:24 PM


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