Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Jacob. Can this be modified to work for rows 1 through 500?
CB "Jacob Skaria" wrote: Set the Security level to low/medium in (Tools|Macro|Security). 'Launch VBE using short-key Alt+F11. Insert a module and paste the below code. Save. Get back to Workbook. Tools|Macro|Run MyMacro() Sub MyMacro() Range("B1") = Range("B1") + 1 If Range("B1") = 12 Then Range("A1") = Range("A1") + 1 Range("B1") = 0 End If End Sub If this post helps click Yes --------------- Jacob Skaria "C" wrote: I am looking for some VBA code that will add one to Column B when executed. I also need this code to add one to column A when Column B is equal to 12 and reset column B to 0. This SS contains years and months. However, I want to execute this manually once a month. Can someone help? Example: March 2009 Column A Column B 1 11 April 2009 After Macro Execution Column W Column X 2 0 May 2009 After Macro Execution Column W Column X 2 1 June 2009 After Macro Execution Column W Column X 2 2 Thanks in advance. C |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
count if condition in two columns | Excel Worksheet Functions | |||
How to Add columns if a condition exists | Excel Discussion (Misc queries) | |||
Hide Columns Based on Condition | Excel Programming | |||
Hide Columns Based on Condition | Excel Programming | |||
Hide Columns On Condition | Excel Programming |