Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
Default week ending funciton

I am needing a formula that will returna week ending date
based, this is primary way the data base needs to be sorted.

Or week ends on SAT
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default week ending funciton

Dylan @ UAFC wrote:
I am needing a formula that will returna week ending date
based, this is primary way the data base needs to be sorted.

Or week ends on SAT



=A1-WEEKDAY(A1)+7
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default week ending funciton

Hi,

If I understand correctly you want the next saturday from a date and if the
date is saturday and you want the folowing saturday change the middle 7 to 14

=A1+IF(WEEKDAY(A1)=7,7,7)-WEEKDAY(A1)

Mike

"Dylan @ UAFC" wrote:

I am needing a formula that will returna week ending date
based, this is primary way the data base needs to be sorted.

Or week ends on SAT

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default week ending funciton

This... IF(WEEKDAY(A1)=7,7,7)... will always return 7... why not just use 7
and save the function calls?

a

--
Rick (MVP - Excel)


"Mike H" wrote in message
...
Hi,

If I understand correctly you want the next saturday from a date and if
the
date is saturday and you want the folowing saturday change the middle 7 to
14

=A1+IF(WEEKDAY(A1)=7,7,7)-WEEKDAY(A1)

Mike

"Dylan @ UAFC" wrote:

I am needing a formula that will returna week ending date
based, this is primary way the data base needs to be sorted.

Or week ends on SAT


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default week ending funciton

Rick,

I wasn't sure what the OP wanted to do if the original date was a saturday
which is why I posted this because WEEKDAY(A1)=7,14,7)... returns the next
saturday. I pointed this out to the OP in my post

Mike

"Rick Rothstein" wrote:

This... IF(WEEKDAY(A1)=7,7,7)... will always return 7... why not just use 7
and save the function calls?

a

--
Rick (MVP - Excel)


"Mike H" wrote in message
...
Hi,

If I understand correctly you want the next saturday from a date and if
the
date is saturday and you want the folowing saturday change the middle 7 to
14

=A1+IF(WEEKDAY(A1)=7,7,7)-WEEKDAY(A1)

Mike

"Dylan @ UAFC" wrote:

I am needing a formula that will returna week ending date
based, this is primary way the data base needs to be sorted.

Or week ends on SAT





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

On Fri, 16 Jan 2009 11:09:01 -0800, Mike H
wrote:

Hi,

If I understand correctly you want the next saturday from a date and if the
date is saturday and you want the folowing saturday change the middle 7 to 14

=A1+IF(WEEKDAY(A1)=7,7,7)-WEEKDAY(A1)

Mike

"Dylan @ UAFC" wrote:

I am needing a formula that will returna week ending date
based, this is primary way the data base needs to be sorted.

Or week ends on SAT



More efficient might be:


Saturday does not advance
=A1+7-WEEKDAY(A1)

Saturday does advance
=A1+8-WEEKDAY(A1-6)

Only one function call instead of three.
--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
week ending peter Excel Worksheet Functions 4 April 3rd 08 03:31 AM
Week Ending formula cindi Excel Discussion (Misc queries) 2 July 11th 07 09:03 PM
Week Ending Reports jmedwards2007 Excel Discussion (Misc queries) 1 March 5th 07 09:25 PM
AVG row of data by Week ending JmyCrikitt Excel Discussion (Misc queries) 4 January 25th 07 06:28 AM
Week ending [email protected] Excel Worksheet Functions 3 November 1st 05 04:52 PM


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