Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How do i create a macro to increase a cell value by a variable number. say
the cell is 12 i want to add 3 to it just by typing in 3 instead of 15. is that possible?? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Put the following in worksheet code:
Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False If Intersect(Target, Range("A1")) Is Nothing Then Application.EnableEvents = True Exit Sub Else Range("A1").Value = Range("A1").Value + memory memory = Range("A1").Value End If Application.EnableEvents = True End Sub Put the following in a standard module: Public memory Sub ordinate() memory = 0 End Sub This uses cell A1 as an example. Whatever you enter in A1 will be added to the previous contents. Run ordinate to clear the memory. -- Gary's Student "Hottshot8226" wrote: How do i create a macro to increase a cell value by a variable number. say the cell is 12 i want to add 3 to it just by typing in 3 instead of 15. is that possible?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Custom functions calculating time arguments Help Desperate | Excel Worksheet Functions | |||
increase the value of a cell by a percentage | Excel Discussion (Misc queries) | |||
Instead of a negative number, I'd like to show zero... | Excel Worksheet Functions | |||
Possible Lookup Table | Excel Worksheet Functions | |||
I need to increase a number which is held in a cell by 1 | New Users to Excel |