+ Reply to Thread
Results 1 to 5 of 5

Moving part of a worksheet to a new worksheet in the same workbook

  1. #1
    Registered User
    Join Date
    02-11-2021
    Location
    London, UK
    MS-Off Ver
    2019
    Posts
    9

    Moving part of a worksheet to a new worksheet in the same workbook

    How can I move part of a worksheet to a new worksheet in the same workbook and maintain all relative cell references so that everything still works after it is moved?

    Thanks

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,870

    Re: Moving part of a worksheet to a new worksheet in the same workbook

    Cut and paste. Relative cell references will be preserved, that is, if you have this formula in Sheet1!A1:

    =Sheet2!B2+E5

    and cut and paste it to Sheet3!C3, it will be pasted as:

    =Sheet2!D4+G7

    I assume that's what you mean by "maintain all relative cell references".

  3. #3
    Registered User
    Join Date
    02-11-2021
    Location
    London, UK
    MS-Off Ver
    2019
    Posts
    9

    Re: Moving part of a worksheet to a new worksheet in the same workbook

    Sorry, I may be asking the question in the wrong way. I'll ask again in a different (and hopefully better) way:

    How can I move part of worksheet 1 to worksheet 2 in the same workbook so that everything still works after it is moved?

    What happens in this example cell if I just cut and paste is this:

    Original cell location
    Cell: AA9 in sheet 1
    Formula: =SUBTOTAL(9,AA4:AA8)
    Value: -£4,293.38

    When moved to sheet 2
    Cell: C9 in sheet 2
    FormulA: =SUBTOTAL(9,C4:C8)
    Value: #REF!

    I need the moved data to still give the same results as it did before it was moved.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,870

    Re: Moving part of a worksheet to a new worksheet in the same workbook

    Rather than "maintain all ative cell references," you mean "treat all relative cell references as if they were absolute." The answer is you have to use absolute references in your formulas before you move them. Whenever you write a formula that refers to other cells, the reference should be absolute unless it has to be relative, such as when you need to copy the formula to multiple places.

    =SUBTOTAL(9,$AA$4:$AA$8)

    When you move it, do you want the formula to still refer to Sheet1? If so, when you paste that on another sheet it should look like this:

    =SUBTOTAL(9,Sheet1!$AA$4:$AA$8)

    If you want the formula to refer to Sheet2 after it's moved then we have a different problem.

  5. #5
    Registered User
    Join Date
    02-11-2021
    Location
    London, UK
    MS-Off Ver
    2019
    Posts
    9

    Re: Moving part of a worksheet to a new worksheet in the same workbook

    Thanks for your help.

+ 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. VBA Moving Worksheet [ No workbook selected ]
    By paniqui2020 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-25-2020, 11:28 PM
  2. [SOLVED] Moving a worksheet to another workbook using a macro
    By JNEWMAN in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2019, 10:38 AM
  3. Replies: 27
    Last Post: 05-24-2018, 05:09 PM
  4. Copying part of a worksheet in one workbook to another workbook
    By j_Southern in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-04-2015, 09:00 PM
  5. [SOLVED] help with moving a worksheet to a workbook
    By Jbryantbaker in forum Excel General
    Replies: 2
    Last Post: 08-18-2015, 10:00 AM
  6. Moving worksheet with named ranges to new workbook without referencing old workbook
    By madcaplaughs79 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-28-2014, 07:54 PM
  7. Replies: 2
    Last Post: 12-30-2005, 12:30 PM

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