Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add one to Column numbers
I have a spreadsheet that I need to increment Column X by one on a monthly
basis. When Column x = 12 then it goes back to 0 and column w is is incremented by one. Example: March 2009 Column W Column X 10 11 April 2009 After Calculation Column W Column X 11 0 May 2009 After Calculation Column W Column X 11 1 Can someone give advice on how to best accomplish this? Thanks in advance. CB |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add one to Column numbers
Cell X1:
=IF(MONTH(TODAY())+8<12;MONTH(TODAY())+8;MONTH(TOD AY())-12) Cell W1: =IF(X1=1;X1-1;X1+11) Then you can drag formula in W1 to column V, U, T, S ... (If wanted) "C" wrote: I have a spreadsheet that I need to increment Column X by one on a monthly basis. When Column x = 12 then it goes back to 0 and column w is is incremented by one. Example: March 2009 Column W Column X 10 11 April 2009 After Calculation Column W Column X 11 0 May 2009 After Calculation Column W Column X 11 1 Can someone give advice on how to best accomplish this? Thanks in advance. CB |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add one to Column numbers
Sorry, I think the reference cell X1 shall be:
=IF(MONTH(TODAY())+8<12;MONTH(TODAY())+8;MONTH(TOD AY())-4) "Joakim Norrman" wrote: Cell X1: =IF(MONTH(TODAY())+8<12;MONTH(TODAY())+8;MONTH(TOD AY())-12) Cell W1: =IF(X1=1;X1-1;X1+11) Then you can drag formula in W1 to column V, U, T, S ... (If wanted) "C" wrote: I have a spreadsheet that I need to increment Column X by one on a monthly basis. When Column x = 12 then it goes back to 0 and column w is is incremented by one. Example: March 2009 Column W Column X 10 11 April 2009 After Calculation Column W Column X 11 0 May 2009 After Calculation Column W Column X 11 1 Can someone give advice on how to best accomplish this? Thanks in advance. CB |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add one to Column numbers
Joakim,
Thanks for the responses, however I can't seem to get any of these to work for me. You are correct that the X value represents months. This month however has nothing to do with current date. The spreadsheet holds personnell information and I just need to update this once a month adding 1 to the X column. When the X column value equals 12 it should reset to 0 and column w should return the current value + 1. Can this be done thru VBA? Thanks, C "Joakim Norrman" wrote: Sorry, I think the reference cell X1 shall be: =IF(MONTH(TODAY())+8<12;MONTH(TODAY())+8;MONTH(TOD AY())-4) "Joakim Norrman" wrote: Cell X1: =IF(MONTH(TODAY())+8<12;MONTH(TODAY())+8;MONTH(TOD AY())-12) Cell W1: =IF(X1=1;X1-1;X1+11) Then you can drag formula in W1 to column V, U, T, S ... (If wanted) "C" wrote: I have a spreadsheet that I need to increment Column X by one on a monthly basis. When Column x = 12 then it goes back to 0 and column w is is incremented by one. Example: March 2009 Column W Column X 10 11 April 2009 After Calculation Column W Column X 11 0 May 2009 After Calculation Column W Column X 11 1 Can someone give advice on how to best accomplish this? Thanks in advance. CB |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I convert a column of positive numbers to negitive numbers | Excel Worksheet Functions | |||
Excel, change column of negative numbers to positive numbers? | New Users to Excel | |||
Converting a Column of Numbers Displayed as Text to Numbers | Excel Programming | |||
Changing column of numbers made of formulas to just numbers | Excel Discussion (Misc queries) | |||
Excel Formula - Add column of numbers but ignore negative numbers | Excel Worksheet Functions |