Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BW BW is offline
external usenet poster
 
Posts: 49
Default Calculating pay dates

If a date is a friday, I want to display the previous Thursday (MM/DD/YYYY).
If a date is a Saturday - Thursday, I want to display the Thursday as a date
(MM/DD/YYYY).

To illustrate, if the date is 05/28/2010, I want to display 05/27/2010. If
the date is 05/29/2010 - 06/03/2010, I want to display 06/03/2010.

I hope this is clear.

Thank you,

BW
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Calculating pay dates

On Thu, 27 May 2010 18:08:01 -0700, BW wrote:

If a date is a friday, I want to display the previous Thursday (MM/DD/YYYY).
If a date is a Saturday - Thursday, I want to display the Thursday as a date
(MM/DD/YYYY).

To illustrate, if the date is 05/28/2010, I want to display 05/27/2010. If
the date is 05/29/2010 - 06/03/2010, I want to display 06/03/2010.

I hope this is clear.

Thank you,

BW



With your date in A1:

=A1+6-WEEKDAY(A1+1)
--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Calculating pay dates

Hi,

You can try this

=C23+CHOOSE(WEEKDAY(C23,2),3,2,1,0,-1,5,4)

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"BW" wrote in message
...
If a date is a friday, I want to display the previous Thursday
(MM/DD/YYYY).
If a date is a Saturday - Thursday, I want to display the Thursday as a
date
(MM/DD/YYYY).

To illustrate, if the date is 05/28/2010, I want to display 05/27/2010.
If
the date is 05/29/2010 - 06/03/2010, I want to display 06/03/2010.

I hope this is clear.

Thank you,

BW


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BW BW is offline
external usenet poster
 
Posts: 49
Default Calculating pay dates

Thank you Ron, this worked perfectly.

BW

"Ron Rosenfeld" wrote:

On Thu, 27 May 2010 18:08:01 -0700, BW wrote:

If a date is a friday, I want to display the previous Thursday (MM/DD/YYYY).
If a date is a Saturday - Thursday, I want to display the Thursday as a date
(MM/DD/YYYY).

To illustrate, if the date is 05/28/2010, I want to display 05/27/2010. If
the date is 05/29/2010 - 06/03/2010, I want to display 06/03/2010.

I hope this is clear.

Thank you,

BW



With your date in A1:

=A1+6-WEEKDAY(A1+1)
--ron
.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BW BW is offline
external usenet poster
 
Posts: 49
Default Calculating pay dates

Ashish Mathur,

your suggestion was helpful, but I found that adding
=text(your_formula,"mm/dd/yyyy") got me to where I needed to be.

Thank you much!

BW

"Ashish Mathur" wrote:

Hi,

You can try this

=C23+CHOOSE(WEEKDAY(C23,2),3,2,1,0,-1,5,4)

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"BW" wrote in message
...
If a date is a friday, I want to display the previous Thursday
(MM/DD/YYYY).
If a date is a Saturday - Thursday, I want to display the Thursday as a
date
(MM/DD/YYYY).

To illustrate, if the date is 05/28/2010, I want to display 05/27/2010.
If
the date is 05/29/2010 - 06/03/2010, I want to display 06/03/2010.

I hope this is clear.

Thank you,

BW


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
Calculating Dates brewster56 Excel Worksheet Functions 4 April 28th 09 06:57 PM
Calculating Dates Gina1737 Excel Worksheet Functions 1 June 17th 08 02:06 AM
Calculating Dates Anne Excel Worksheet Functions 6 February 7th 08 12:56 AM
Calculating number of days between two dates that fall between two other dates [email protected] Excel Discussion (Misc queries) 5 October 26th 05 06:18 PM
calculating with dates DzEK Excel Worksheet Functions 1 June 30th 05 01:46 AM


All times are GMT +1. The time now is 10:06 PM.

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

About Us

"It's about Microsoft Excel"