Results 1 to 3 of 3

Copy Formula without Original reference

Threaded View

  1. #1
    Registered User
    Join Date
    03-10-2022
    Location
    Illinois
    MS-Off Ver
    Office 365
    Posts
    14

    Copy Formula without Original reference

    Good morning all,
    I have a couple of identical worksheets that my coworkers use to capture some data. I then want to import their data into a master sheet. The data is laid out in tabular form (see image1), and at the end of the row there is a formula that calculates a result (Pass/Fail) based on the values entered in the preceding columns.

    What I'm trying to do is to copy the data from the coworker sheets and append that data to the same structured table in a master sheet. I am able to accomplish all of this, with one exception. The formula that gets copied into the master sheet still refers to the cells in the original coworker sheet (see image2). I cant seem to figure out how to have that formula simply refer to the same cells in the master sheet. I've tried various iterations of the PasteSpecial options (xlpastevalues, xlpasteformulas, etc), but to no avail. Some of my attempts are remarked out in the code below.

    NOTE: Image2 shows the results of the copied data in the Master workbook, but the formula for the Result column is still referencing the original sheet it came from, which is "Staff Ticket Review 2022 - Scott.xlsm".

    Here is the "copy" code which works exactly as I want except for the formula reference. "sht1" (and all 1's) refer to the master sheet being copied to, and "sht2" (and all 2's) refer to the individual co-worker sheet I am copying from.

       ' copy the data from tblTableName2
        'sht2.Activate
    '    tblTableName2.Range("A" & StartRow2 & ":R" & BRow2).Copy 'Destination:=tblTableName1.Range("A" & StartRow1)
        With tblTableName2
          .DataBodyRange.Copy Destination:=sht1.Range("A" & StartRow1)
        End With
    
        ' copy to tblTableName1
    '    sht1.Activate
    '    'tblTableName1.Range("A" & StartRow1).PasteSpecial
    '    sht1.Range("A" & StartRow1).PasteSpecial xlPasteFormulas
    '
    Attached Images Attached Images
    Last edited by CSASCott; 04-21-2022 at 10:56 AM.
    Thank you,
    CSAScott

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Copy & paste formula without changing the original range selection
    By jjanx in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-21-2021, 04:09 PM
  2. Replies: 4
    Last Post: 06-07-2019, 07:44 AM
  3. Replies: 1
    Last Post: 01-09-2018, 09:37 AM
  4. Replies: 0
    Last Post: 08-07-2015, 08:44 PM
  5. Copy formula to tab 2, keeping original source tab 1.
    By h4l in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-09-2014, 01:25 PM
  6. [SOLVED] Copy formulas from one spreadsheet to another keeping the original sheet cell reference
    By Sheepdog in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-08-2012, 02:41 PM
  7. copied formula has correct cell reference, but result of original
    By lvito in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-14-2005, 12:05 PM

Tags for this Thread

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