PC Review


Reply
Thread Tools Rate Thread

Edit cell to add value to existing number

 
 
revinfo@mewbourne.com
Guest
Posts: n/a
 
      5th Apr 2007
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?QXJ0?=
Guest
Posts: n/a
 
      5th Apr 2007
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.

"(E-Mail Removed)" 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
>
>

 
Reply With Quote
 
revinfo@mewbourne.com
Guest
Posts: n/a
 
      9th Apr 2007
On Apr 5, 4:48 pm, Art <A...@discussions.microsoft.com> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW DO I ADD A LETTER BEFORE AN EXISTING NUMBER IN A CELL? =?Utf-8?B?UEFVTFA=?= Microsoft Excel Worksheet Functions 8 27th Jan 2006 07:16 PM
How Can I prevent a new row in datagrid But permit to edit existing cell ? Marc R. Microsoft VB .NET 5 13th Jan 2006 01:31 AM
Use VBA to add to existing number in cell Hywel Microsoft Excel Misc 2 5th Dec 2005 03:13 PM
edit number in cell without it changing to text =?Utf-8?B?cmtscmVtb3Rl?= Microsoft Excel Misc 1 19th May 2005 10:22 PM
Adding 2 0's to an existing number in a cell Adam Drake Microsoft Excel Worksheet Functions 3 4th Feb 2004 02:39 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:30 PM.