+ Reply to Thread
Results 1 to 9 of 9

Adding 2 cells

Hybrid View

Boogmeister11 Adding 2 cells 10-16-2006, 11:48 AM
mangesh_yadav example ..? lets say you... 10-16-2006, 12:03 PM
Boogmeister11 i would like the answer to be... 10-16-2006, 02:05 PM
oldchippy That creates a circular... 10-16-2006, 04:39 PM
starguy if you put =A1+A2 in cell A2,... 10-17-2006, 03:03 AM
MrShorty This can usually be... 10-17-2006, 11:41 AM
Boogmeister11 This is for a pricing sheet... 10-17-2006, 03:28 PM
oldchippy Hi Boogmeister, When you... 10-18-2006, 03:46 AM
mangesh_yadav Adding further to what... 10-18-2006, 03:55 AM
  1. #1
    Registered User
    Join Date
    10-16-2006
    Posts
    3
    This is for a pricing sheet and i want to be able to add the amount in A1 to all the cells that contain a price that needs to be changed.

    How do i do a VBA worksheet_change or a worksheet_calculate procedure?

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Quote Originally Posted by Boogmeister11
    This is for a pricing sheet and i want to be able to add the amount in A1 to all the cells that contain a price that needs to be changed.

    How do i do a VBA worksheet_change or a worksheet_calculate procedure?
    Hi Boogmeister,

    When you say i want to be able to add the amount in A1 to all the cells that contain a price that needs to be changed, you can do this by copying A1, then selecting the range of cells that need the price changed, then Paste > Special > Operation > Add. This will add the amount in A1 to all the prices.

    Is this what you are trying to do?

    oldchippy

  3. #3
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    Adding further to what oldchippy suggested, record a macro when you are doing that. So the steps would be something like:

    1. Tools > Macro > Record new macro
    2. copy A1
    3. Select all the cells to which you want to add A1
    4. Edit > Paste special > Add
    5. Tools > Macro > Stop recording

    You can now call this macro as many times as you want to add. The macro generated will look something like this:


    Sub Macro1()
    '
    ' Macro1 Macro
    ' Macro recorded 10/18/2006 by pc-user
    '

    '
    Range("A1").Select
    Application.CutCopyMode = False
    Selection.Copy
    Range("C1:C4").Select
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlAdd, SkipBlanks:= _
    False, Transpose:=False
    End Sub


    You may add a button on the worksheet and link the macro to this button, or better still add a worksheet change event for target cell A1 so every time you change the value in A1, all the cells with the prices automatically change.


    Mangesh

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1