Edit cell to add value to existing number

R

revinfo

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
 
A

Art

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.
 
R

revinfo

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top