+ Reply to Thread
Results 1 to 3 of 3

How do I make a cell's contents equal to another cell's contents with macro program?

  1. #1
    Registered User
    Join Date
    08-24-2005
    Posts
    11

    How do I make a cell's contents equal to another cell's contents with macro program?

    I am writing macros that are run when you select an item from a list. Then the macro inputs a particular cell’s contents into another cell. The problem is the recording function of macro creates programming that causes serious problems in spreadsheet if I add or delete cells.

    Here is an example of a macro:
    Sub AZWagePump3()
    '
    ' AZWagePump3 Macro
    ' Macro recorded 8/19/2005 by Systems Administrator
    '

    Range("B25").Select
    ActiveCell.FormulaR1C1 = "=R[181]C"
    Range("C25").Select
    ActiveCell.FormulaR1C1 = "=R[181]C"

    End Sub


    I am need a program that in essence is C4 = D4 so that what ever cell I change around it the macro still functions correctly.

  2. #2
    Gary''s Student
    Guest

    RE: How do I make a cell's contents equal to another cell's contents w

    If you are going to add/remove cells, rows or columns, you should assign
    named ranges for your copy/paste targets. That way you can name them and
    forget them.

    ToPlace.value = FromPlace.value
    --
    Gary''s Student


    "mgmcdevitt" wrote:

    >
    > I am writing macros that are run when you select an item from a list.
    > Then the macro inputs a particular cell’s contents into another cell.
    > The problem is the recording function of macro creates programming that
    > causes serious problems in spreadsheet if I add or delete cells.
    >
    > Here is an example of a macro:
    > Sub AZWagePump3()
    > '
    > ' AZWagePump3 Macro
    > ' Macro recorded 8/19/2005 by Systems Administrator
    > '
    >
    > Range("B25").Select
    > ActiveCell.FormulaR1C1 = "=R[181]C"
    > Range("C25").Select
    > ActiveCell.FormulaR1C1 = "=R[181]C"
    >
    > End Sub
    >
    >
    > I am need a program that in essence is C4 = D4 so that what ever cell I
    > change around it the macro still functions correctly.
    >
    >
    > --
    > mgmcdevitt
    > ------------------------------------------------------------------------
    > mgmcdevitt's Profile: http://www.excelforum.com/member.php...o&userid=26592
    > View this thread: http://www.excelforum.com/showthread...hreadid=467971
    >
    >


  3. #3
    Registered User
    Join Date
    08-24-2005
    Posts
    11

    Could you explain it a little more?

    I am not sure exactly what you mean. Could you explain it a little more for me?

+ 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