#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 177
Default Match Date

If I have a date in date format, how can I match a value in the date.

For example, in cell A1 I type in 6/30/06. This is the month of June.

In Cell B1, I want to create a formula that says essentially "If the Date is
in the month of June then add 31 days"

So I get 7/31/06 in cell B1.

How do I do this? Thanks very much.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Match Date

=if(month(a1)=6,a1+31,"what should happen otherwise?")

(format as a date)

SteveC wrote:

If I have a date in date format, how can I match a value in the date.

For example, in cell A1 I type in 6/30/06. This is the month of June.

In Cell B1, I want to create a formula that says essentially "If the Date is
in the month of June then add 31 days"

So I get 7/31/06 in cell B1.

How do I do this? Thanks very much.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 177
Default Match Date

thanks.

"Dave Peterson" wrote:

=if(month(a1)=6,a1+31,"what should happen otherwise?")

(format as a date)

SteveC wrote:

If I have a date in date format, how can I match a value in the date.

For example, in cell A1 I type in 6/30/06. This is the month of June.

In Cell B1, I want to create a formula that says essentially "If the Date is
in the month of June then add 31 days"

So I get 7/31/06 in cell B1.

How do I do this? Thanks very much.


--

Dave Peterson

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 create a schedule from a list of dates ? Gavin Morris Charts and Charting in Excel 2 October 28th 10 04:08 PM
count between start date and end date flow23 Excel Discussion (Misc queries) 5 May 10th 06 01:22 PM
Determining Date X based on Other dates MIchel Khennafi Excel Worksheet Functions 1 May 3rd 06 04:45 PM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Worksheet Functions 2 April 21st 06 02:50 AM
NETWORKDAYS - Multiple Date Selection Annabelle Excel Discussion (Misc queries) 3 October 4th 05 07:04 PM


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