Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default If weekend date display previous Friday date

Cell A1 contains a date. Cell B1 contains the number of weeks to be added to
cell A1. I need cell C1 to show the result of A1 plus the number of weeks,
however if the result date falls on a Saturday or Sunday I need the cell in
C1 to show the preceeding Friday date. Can anyone help please?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default If weekend date display previous Friday date

=A1+(B1*7)-IF(WEEKDAY(A1)=7,1,IF(WEEKDAY(A1)=1,2,0))

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"jimar" wrote in message ...
| Cell A1 contains a date. Cell B1 contains the number of weeks to be added to
| cell A1. I need cell C1 to show the result of A1 plus the number of weeks,
| however if the result date falls on a Saturday or Sunday I need the cell in
| C1 to show the preceeding Friday date. Can anyone help please?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default If weekend date display previous Friday date

Niek, thank you for the reply but I have not been clear enough in my original
posting. The formula I was using was =A1+(B1*7)-1) So that if A1 was a
Wednesday the result in C1 would be the number of weeks minus a day ie a
Tuesday. This is ok except when A1 is a Monday as C1 would show a Sunday
date and I would need it to show the previous Friday date. Any further help
would be very much appreciated

"Niek Otten" wrote:

=A1+(B1*7)-IF(WEEKDAY(A1)=7,1,IF(WEEKDAY(A1)=1,2,0))

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"jimar" wrote in message ...
| Cell A1 contains a date. Cell B1 contains the number of weeks to be added to
| cell A1. I need cell C1 to show the result of A1 plus the number of weeks,
| however if the result date falls on a Saturday or Sunday I need the cell in
| C1 to show the preceeding Friday date. Can anyone help please?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default If weekend date display previous Friday date

Niel's well designed formula first establishes the exact B1 (say 3)
week period away from A1;
then he subtracts either 1 (if A1 is a Saturday(7)) or 2 (if A1 is a
Sunday(1)).

Sounds like you need to modify for If(WEEKDAY(A1)=2,3 type...

HTH


"jimar" wrote:

Niek, thank you for the reply but I have not been clear enough in my original
posting. The formula I was using was =A1+(B1*7)-1) So that if A1 was a
Wednesday the result in C1 would be the number of weeks minus a day ie a
Tuesday. This is ok except when A1 is a Monday as C1 would show a Sunday
date and I would need it to show the previous Friday date. Any further help
would be very much appreciated

"Niek Otten" wrote:

=A1+(B1*7)-IF(WEEKDAY(A1)=7,1,IF(WEEKDAY(A1)=1,2,0))

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"jimar" wrote in message ...
| Cell A1 contains a date. Cell B1 contains the number of weeks to be added to
| cell A1. I need cell C1 to show the result of A1 plus the number of weeks,
| however if the result date falls on a Saturday or Sunday I need the cell in
| C1 to show the preceeding Friday date. Can anyone help please?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default If weekend date display previous Friday date

JMay thankyou for the input. Formula now doing what I need it to do. Thanks
to you both.

"JMay" wrote:

Niel's well designed formula first establishes the exact B1 (say 3)
week period away from A1;
then he subtracts either 1 (if A1 is a Saturday(7)) or 2 (if A1 is a
Sunday(1)).

Sounds like you need to modify for If(WEEKDAY(A1)=2,3 type...

HTH


"jimar" wrote:

Niek, thank you for the reply but I have not been clear enough in my original
posting. The formula I was using was =A1+(B1*7)-1) So that if A1 was a
Wednesday the result in C1 would be the number of weeks minus a day ie a
Tuesday. This is ok except when A1 is a Monday as C1 would show a Sunday
date and I would need it to show the previous Friday date. Any further help
would be very much appreciated

"Niek Otten" wrote:

=A1+(B1*7)-IF(WEEKDAY(A1)=7,1,IF(WEEKDAY(A1)=1,2,0))

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"jimar" wrote in message ...
| Cell A1 contains a date. Cell B1 contains the number of weeks to be added to
| cell A1. I need cell C1 to show the result of A1 plus the number of weeks,
| however if the result date falls on a Saturday or Sunday I need the cell in
| C1 to show the preceeding Friday date. Can anyone help please?



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
How do I set NETWORKDAYS to regard friday and saturday as weekend Shay.C. Excel Worksheet Functions 2 April 13th 10 05:13 PM
Finding the previous Saturday, then Friday date Bob Excel Worksheet Functions 3 April 9th 08 03:32 AM
In excel,how do I change the date to a date 84 days from previous Alister Edmond Excel Discussion (Misc queries) 3 February 9th 06 02:24 PM
the date always friday Richard New Users to Excel 3 November 28th 05 06:15 AM
date of last friday of previous month tkaplan Excel Discussion (Misc queries) 7 November 14th 05 06:05 PM


All times are GMT +1. The time now is 11:14 AM.

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"