ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Add one Month in the next cell for several months/years (https://www.excelbanter.com/excel-discussion-misc-queries/55799-add-one-month-next-cell-several-months-years.html)

heater

Add one Month in the next cell for several months/years
 
I want to add a month in the next cell over for several years. EX: In cell
A1 is Dec 2005. In cell B1 I want Jan 2006 and so on for several
months/years. When you put in a formula of =A1+31, eventually it will put in
the wrong month. I assume because of Leap Year.

Bob Phillips

Add one Month in the next cell for several months/years
 
In A1, enter 01/12/2005
In B1, enter date(year(A1),month(A1)+1,1) and copy across

--

HTH

RP
(remove nothere from the email address if mailing direct)


"heater" wrote in message
...
I want to add a month in the next cell over for several years. EX: In

cell
A1 is Dec 2005. In cell B1 I want Jan 2006 and so on for several
months/years. When you put in a formula of =A1+31, eventually it will put

in
the wrong month. I assume because of Leap Year.




Gary''s Student

Add one Month in the next cell for several months/years
 
You should use the DATE() function:

if a date is is A1, then in B1 put:

=DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)) and just continue
--
Gary's Student


"heater" wrote:

I want to add a month in the next cell over for several years. EX: In cell
A1 is Dec 2005. In cell B1 I want Jan 2006 and so on for several
months/years. When you put in a formula of =A1+31, eventually it will put in
the wrong month. I assume because of Leap Year.


bpeltzer

Add one Month in the next cell for several months/years
 
Add a month instead of a fixed number of days:
=date(year(a1),month(a1)+1,1). (Note that I'm forcing the date in each month
to be the first; if your starting date is greater than the 28th of the
month, adding a month could eventually cause issues).

"heater" wrote:

I want to add a month in the next cell over for several years. EX: In cell
A1 is Dec 2005. In cell B1 I want Jan 2006 and so on for several
months/years. When you put in a formula of =A1+31, eventually it will put in
the wrong month. I assume because of Leap Year.



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com