Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 193
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default 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

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
Useful Additions Ron100 Excel Discussion (Misc queries) 1 January 13th 10 01:38 PM
Additions Marc Excel Discussion (Misc queries) 1 November 11th 09 05:35 AM
Filter out unique additions month to month Rookie_User Excel Discussion (Misc queries) 3 March 13th 09 02:29 PM
Can I allow Additions but not Edits? Keith Excel Discussion (Misc queries) 2 November 9th 06 01:10 PM
Cell Additions acopper57 via OfficeKB.com Excel Worksheet Functions 0 May 17th 06 11:54 PM


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