+ Reply to Thread
Results 1 to 3 of 3

Copy Formula without Original reference

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

    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.

    Please Login or Register  to view this content.
    '
    Attached Images Attached Images
    Last edited by CSASCott; 04-21-2022 at 10:56 AM.
    Thank you,
    CSAScott

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
    Posts
    60,540

    Re: Copy Formula without Original reference

    Administrative Note:

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. As you are still quite new here, I will do it for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" to anyone who has offered you help in your thread. You can reward them by clicking on * Add Reputation below theur user name on the left, if you wish.


    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.

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

    Re: Copy Formula without Original reference

    Ali,
    Thank you very much. I see how that makes a huge difference, and I did not remember to add those tags. My apologies, and I will be more diligent in the future.

    -Scott

+ Reply to Thread

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