Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How to determine the date?

Does anyone have any suggestions on how to determine the date?

If cell A1 is week, then I would like to show next coming Sunday in cell B1,
If today is Sunday, then show today in cell B1.

[Repeat requirements for Month]
If cell A1 is month, then I would like to show the last day of this month in
cell B1,
If today is the last day of this month, then show today in cell B1.

[Repeat requirements for Quarter]
If cell A1 is Quarter, then I would like to show the last day of this
quarter in cell B1,
If today is the last day of this quarter, then show today in cell B1.

[Repeat requirements for Year]
If cell A1 is Year, then I would like to show the last day of this year in
cell B1,
If today is the last day of this year, then show today in cell B1.

Does anyone have any suggestions on how to do it?
Thank you in advance for any suggestions
Eric
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 65
Default How to determine the date?

ENTER THE FOLLOWING FORMULA IN B1 CELL TO SOLVE YOUR SUNDAY PROBLEM

=IF(WEEKDAY(A1)=1,A1,A1+(8-WEEKDAY(A1)))

"Eric" wrote:

Does anyone have any suggestions on how to determine the date?

If cell A1 is week, then I would like to show next coming Sunday in cell B1,
If today is Sunday, then show today in cell B1.

[Repeat requirements for Month]
If cell A1 is month, then I would like to show the last day of this month in
cell B1,
If today is the last day of this month, then show today in cell B1.

[Repeat requirements for Quarter]
If cell A1 is Quarter, then I would like to show the last day of this
quarter in cell B1,
If today is the last day of this quarter, then show today in cell B1.

[Repeat requirements for Year]
If cell A1 is Year, then I would like to show the last day of this year in
cell B1,
If today is the last day of this year, then show today in cell B1.

Does anyone have any suggestions on how to do it?
Thank you in advance for any suggestions
Eric

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default How to determine the date?

On Wed, 16 May 2007 02:21:00 -0700, Eric
wrote:

Does anyone have any suggestions on how to determine the date?

If cell A1 is week, then I would like to show next coming Sunday in cell B1,
If today is Sunday, then show today in cell B1.

[Repeat requirements for Month]
If cell A1 is month, then I would like to show the last day of this month in
cell B1,
If today is the last day of this month, then show today in cell B1.

[Repeat requirements for Quarter]
If cell A1 is Quarter, then I would like to show the last day of this
quarter in cell B1,
If today is the last day of this quarter, then show today in cell B1.

[Repeat requirements for Year]
If cell A1 is Year, then I would like to show the last day of this year in
cell B1,
If today is the last day of this year, then show today in cell B1.

Does anyone have any suggestions on how to do it?
Thank you in advance for any suggestions
Eric


Here are some formulas. You should be able to work out the IF configuration,
and how to set it up using data validation:

week =TODAY()+7-WEEKDAY(TODAY()-1)
month =DATE(YEAR(TODAY()),MONTH(TODAY())+1,0)
Quarter =DATE(YEAR(TODAY()),(INT((MONTH(TODAY())-1)/3)+1)*3+1,0)
Year =DATE(YEAR(TODAY()),12,31)


--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
Determine day of the week from date dan Excel Discussion (Misc queries) 4 January 31st 07 09:22 PM
Determine which column to use by date Mike Griffin Excel Worksheet Functions 5 March 2nd 06 01:18 PM
Function determine if date is even or odd jlewis Excel Worksheet Functions 2 November 17th 05 02:22 AM
How can I determine the century of a date in Excel? Robin Excel Worksheet Functions 8 May 27th 05 06:09 PM
Using formulas to determine date in one cell based on date in anot Gary Excel Worksheet Functions 2 November 22nd 04 08:11 AM


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