Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculating Dates | Excel Worksheet Functions | |||
Calculating Dates | Excel Worksheet Functions | |||
Calculating Dates | Excel Worksheet Functions | |||
Calculating number of days between two dates that fall between two other dates | Excel Discussion (Misc queries) | |||
calculating with dates | Excel Worksheet Functions |