A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculating pay dates



 
 
Thread Tools Display Modes
  #1  
Old May 28th, 2010, 02:08 AM posted to microsoft.public.excel.worksheet.functions
bw
external usenet poster
 
Posts: 55
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  
Old May 28th, 2010, 02:24 AM posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
external usenet poster
 
Posts: 3,719
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  
Old May 29th, 2010, 12:35 AM posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_]
external usenet poster
 
Posts: 1,764
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  
Old June 6th, 2010, 04:58 AM posted to microsoft.public.excel.worksheet.functions
bw
external usenet poster
 
Posts: 55
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  
Old June 6th, 2010, 04:58 AM posted to microsoft.public.excel.worksheet.functions
bw
external usenet poster
 
Posts: 55
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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:13 PM.


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