Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 59
Default Question regarding dates

I would like to know how I can denote the first day of the next month based
upon a date in another cell. For instance, if I had in cell A1 June 13, 2008
what is the formula I would write in cell A2 to show a value of July 1, 2008
by reference to A1?

Thanks,

Jimmy
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Question regarding dates

In A2: =DATE(YEAR(A1),MONTH(A1)+1,1)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Jimmy" wrote:
I would like to know how I can denote the first day of the next month based
upon a date in another cell. For instance, if I had in cell A1 June 13, 2008
what is the formula I would write in cell A2 to show a value of July 1, 2008
by reference to A1?

Thanks,

Jimmy

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Question regarding dates

On Fri, 13 Jun 2008 15:43:01 -0700, Jimmy
wrote:

I would like to know how I can denote the first day of the next month based
upon a date in another cell. For instance, if I had in cell A1 June 13, 2008
what is the formula I would write in cell A2 to show a value of July 1, 2008
by reference to A1?

Thanks,

Jimmy



A2: =A1+1-DAY(A1)

--ron
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Question regarding dates

You went after the wrong month Ron.

Rick


"Ron Rosenfeld" wrote in message
...
On Fri, 13 Jun 2008 15:43:01 -0700, Jimmy

wrote:

I would like to know how I can denote the first day of the next month
based
upon a date in another cell. For instance, if I had in cell A1 June 13,
2008
what is the formula I would write in cell A2 to show a value of July 1,
2008
by reference to A1?

Thanks,

Jimmy



A2: =A1+1-DAY(A1)

--ron


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Question regarding dates

On Fri, 13 Jun 2008 20:25:41 -0400, "Rick Rothstein \(MVP - VB\)"
wrote:

You went after the wrong month Ron.

Rick


Funny what an adult beverage will do :-(

Should be

=A1-DAY(A1)+33-DAY(A1-DAY(A1)+32)

but now it's longer than the DATE function.

=DATE(YEAR(A1),MONTH(A1)+1,1)

<sigh



--ron


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default Question regarding dates


Funny what an adult beverage will do :-(

Should be

=A1-DAY(A1)+33-DAY(A1-DAY(A1)+32)

but now it's longer than the DATE function.

=DATE(YEAR(A1),MONTH(A1)+1,1)

<sigh

--ron


If shorter is better, what about....
=EOMONTH(A1,0)+1
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Question regarding dates

On Mon, 16 Jun 2008 08:49:03 -0700 (PDT), Spiky
wrote:


Funny what an adult beverage will do :-(

Should be

=A1-DAY(A1)+33-DAY(A1-DAY(A1)+32)

but now it's longer than the DATE function.

=DATE(YEAR(A1),MONTH(A1)+1,1)

<sigh

--ron


If shorter is better, what about....
=EOMONTH(A1,0)+1


There are other parameters besides "shorter".

In pre-2007 versions, EOMONTH requires the Analysis Tool Pak to be installed.
Some IT departments don't do that, or allow it for all of their users. Also, if
that function is being used, then EVERY computer to which the spreadsheet is
distributed must have the ATP installed.

So unless you can guarantee that every computer will have the ATP installed, or
will be using Excel 2007+, it's probably better to avoid ATP functions.
--ron
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default Question regarding dates

On Jun 16, 2:32 pm, Ron Rosenfeld wrote:
On Mon, 16 Jun 2008 08:49:03 -0700 (PDT), Spiky
wrote:





Funny what an adult beverage will do :-(


Should be


=A1-DAY(A1)+33-DAY(A1-DAY(A1)+32)


but now it's longer than the DATE function.


=DATE(YEAR(A1),MONTH(A1)+1,1)


<sigh


--ron


If shorter is better, what about....
=EOMONTH(A1,0)+1


There are other parameters besides "shorter".

In pre-2007 versions, EOMONTH requires the Analysis Tool Pak to be installed.
Some IT departments don't do that, or allow it for all of their users. Also, if
that function is being used, then EVERY computer to which the spreadsheet is
distributed must have the ATP installed.

So unless you can guarantee that every computer will have the ATP installed, or
will be using Excel 2007+, it's probably better to avoid ATP functions.
--ron


Hmpf. Any computer (or user) without all of the functions is
pointless. But I bow to the bureaucracy. I'm not here to change other
companies.
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
Question regarding Dates LiveUser Excel Discussion (Misc queries) 1 March 13th 08 09:09 PM
If Then Question Regarding Dates PHEB Excel Worksheet Functions 4 October 3rd 06 01:37 AM
Silly question about using dates Zerosumgame Excel Discussion (Misc queries) 5 April 1st 06 03:37 AM
Question on sorting dates Excel heavy user Excel Discussion (Misc queries) 3 January 21st 05 05:12 PM
Another question regarding Dates.. Anthony Slater Excel Discussion (Misc queries) 2 December 20th 04 03:31 PM


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