Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Groupies:
I would like to create a macro that allows me to add the value of 1 to the content of any cell that I select. For example: If I select a10,b12,c23 and d45, I would like to click on a button and have their current content increase by 1. I think this needs to be done in VBA code, but I am not sure what to do or how to start ...........something like x=x+1..... Any ideas or suggestions? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
how about
for each c in selection c.value=c+1 next -- Don Guillett SalesAid Software "CJ" wrote in message ... Hi Groupies: I would like to create a macro that allows me to add the value of 1 to the content of any cell that I select. For example: If I select a10,b12,c23 and d45, I would like to click on a button and have their current content increase by 1. I think this needs to be done in VBA code, but I am not sure what to do or how to start ...........something like x=x+1..... Any ideas or suggestions? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Don:
That is exactly what I wanted. I'm not sure if I went about it properly, I pretended to record a macro, stopped recording and then edited to add your text. Thanks a bunch! CJ "Don Guillett" wrote: how about for each c in selection c.value=c+1 next -- Don Guillett SalesAid Software "CJ" wrote in message ... Hi Groupies: I would like to create a macro that allows me to add the value of 1 to the content of any cell that I select. For example: If I select a10,b12,c23 and d45, I would like to click on a button and have their current content increase by 1. I think this needs to be done in VBA code, but I am not sure what to do or how to start ...........something like x=x+1..... Any ideas or suggestions? Thanks |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sure, here it is:
Sub Increase1() ' ' Increase1 Macro ' Macro recorded 3/30/2006 ' For Each C In Selection C.Value = C + 1 Next ' End Sub CJ "Don Guillett" wrote: glad it helped. Perhaps you should post your final for the archives -- Don Guillett SalesAid Software "CJ" wrote in message ... Hi Don: That is exactly what I wanted. I'm not sure if I went about it properly, I pretended to record a macro, stopped recording and then edited to add your text. Thanks a bunch! CJ "Don Guillett" wrote: how about for each c in selection c.value=c+1 next -- Don Guillett SalesAid Software "CJ" wrote in message ... Hi Groupies: I would like to create a macro that allows me to add the value of 1 to the content of any cell that I select. For example: If I select a10,b12,c23 and d45, I would like to click on a button and have their current content increase by 1. I think this needs to be done in VBA code, but I am not sure what to do or how to start ...........something like x=x+1..... Any ideas or suggestions? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create a "cell button" to hide selected cells. | Excel Worksheet Functions | |||
If option button not selected | Excel Programming | |||
Checking to see if a button is selected | Excel Programming | |||
How do I lock a radio button group if a N/A button is selected | Excel Discussion (Misc queries) | |||
Determine which button was selected ?? | Excel Programming |