Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Edit cell to add value to existing number
This should be easy, and I want to have a macro attached to a toolbar
to do the following. Assume I am in cell "A1" and for the sake of discussion, say it contains the value 100. If I click the toolbar item I want to setup, then what I want to do is to have the macro push the edit key (f2), {home key}, then insert the "=" sign, then hit the "end" key to skip out to the right of the last part of the cell entry and then place a "+" key to where all have to do is to type another value to complete the arithmetical equation. So, basically, I select a key, hit the macro key I setup, then type 150 and press enter. How do I set this up? Bruce |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Edit cell to add value to existing number
Here's the macro:
SendKeys "{F2}{Home}={end}{+}", True You can put a custom button (from the macros command in customize) and assign this macro to it. " wrote: This should be easy, and I want to have a macro attached to a toolbar to do the following. Assume I am in cell "A1" and for the sake of discussion, say it contains the value 100. If I click the toolbar item I want to setup, then what I want to do is to have the macro push the edit key (f2), {home key}, then insert the "=" sign, then hit the "end" key to skip out to the right of the last part of the cell entry and then place a "+" key to where all have to do is to type another value to complete the arithmetical equation. So, basically, I select a key, hit the macro key I setup, then type 150 and press enter. How do I set this up? Bruce |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Edit cell to add value to existing number
On Apr 5, 4:48 pm, Art wrote:
Here's the macro: SendKeys "{F2}{Home}={end}{+}", True You can put a custom button (from the macros command in customize) and assign this macro to it. The macro works fine. Thanks, I was not familiar with the "Sendkeys" method, or function or whatever it happens to be. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HOW DO I ADD A LETTER BEFORE AN EXISTING NUMBER IN A CELL? | Excel Worksheet Functions | |||
Use VBA to add to existing number in cell | Excel Discussion (Misc queries) | |||
edit number in cell without it changing to text | Excel Discussion (Misc queries) | |||
HOW DO I EDIT AN EXISTING FILE TO BE SPACE DELIMITED? | Excel Discussion (Misc queries) | |||
Macro to edit existing formulas | Excel Programming |