Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Art Art is offline
external usenet poster
 
Posts: 587
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW DO I ADD A LETTER BEFORE AN EXISTING NUMBER IN A CELL? PAULP Excel Worksheet Functions 8 January 27th 06 07:16 PM
Use VBA to add to existing number in cell Hywel Excel Discussion (Misc queries) 2 December 5th 05 03:13 PM
edit number in cell without it changing to text rklremote Excel Discussion (Misc queries) 1 May 19th 05 10:22 PM
HOW DO I EDIT AN EXISTING FILE TO BE SPACE DELIMITED? cf Excel Discussion (Misc queries) 1 February 18th 05 05:29 PM
Macro to edit existing formulas LowKey Excel Programming 1 October 16th 04 09:16 PM


All times are GMT +1. The time now is 06:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"