ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Month Additions (https://www.excelbanter.com/excel-programming/328775-month-additions.html)

Robert

Month Additions
 
Hi
I was wondering if there is a way to limit additions to 12 numbers only.
For example, I have a column of months (in numbers) in A and in B, I have
month+2.
Col A Col B
1 3
2 4
3 5
4 6
5 7
6 8
7 9
8 10
9 11
10 12
11 13
12 14
But instead of 13 and 14 in ColB I need it to go back to 1 and 2 respectively.

Any help would be greatly appreciated.
Thanks


Ron de Bruin

Month Additions
 
One way

If A are dates

=MONTH(DATE(2005,MONTH(A3)+2,1))

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Robert" wrote in message ...
Hi
I was wondering if there is a way to limit additions to 12 numbers only.
For example, I have a column of months (in numbers) in A and in B, I have
month+2.
Col A Col B
1 3
2 4
3 5
4 6
5 7
6 8
7 9
8 10
9 11
10 12
11 13
12 14
But instead of 13 and 14 in ColB I need it to go back to 1 and 2 respectively.

Any help would be greatly appreciated.
Thanks




Jim Thomlinson[_3_]

Month Additions
 
Try this formula

=IF(A1+2 = 12, 12, MOD(A1+2, 12))

It assumes your data is in A1 - A12

HTH

"Robert" wrote:

Hi
I was wondering if there is a way to limit additions to 12 numbers only.
For example, I have a column of months (in numbers) in A and in B, I have
month+2.
Col A Col B
1 3
2 4
3 5
4 6
5 7
6 8
7 9
8 10
9 11
10 12
11 13
12 14
But instead of 13 and 14 in ColB I need it to go back to 1 and 2 respectively.

Any help would be greatly appreciated.
Thanks


Jim Thomlinson[_3_]

Month Additions
 
Sorry. That formula dies at 24, 36... This formula works for any values

=IF(MOD(A1+2, 12) = 0, 12, MOD(A1+2, 12))

HTH

"Jim Thomlinson" wrote:

Try this formula

=IF(A1+2 = 12, 12, MOD(A1+2, 12))

It assumes your data is in A1 - A12

HTH

"Robert" wrote:

Hi
I was wondering if there is a way to limit additions to 12 numbers only.
For example, I have a column of months (in numbers) in A and in B, I have
month+2.
Col A Col B
1 3
2 4
3 5
4 6
5 7
6 8
7 9
8 10
9 11
10 12
11 13
12 14
But instead of 13 and 14 in ColB I need it to go back to 1 and 2 respectively.

Any help would be greatly appreciated.
Thanks



All times are GMT +1. The time now is 05:33 PM.

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