+ Reply to Thread
Results 1 to 3 of 3

Copy and paste a sum formula but change column reference to a specific column

  1. #1
    Registered User
    Join Date
    11-09-2020
    Location
    Glasgow, Scotland
    MS-Off Ver
    Windows 10
    Posts
    2

    Copy and paste a sum formula but change column reference to a specific column

    Hi all,

    I'm looking for a shortcut or quicker method of copying and pasting a sum formula and changing the columns references in the formula...

    I have workbooks that contains a sheet which is a Detailed Breakdown of costs and prices for estimating projects which can run to hundreds of lines of activities. In that workbook I also have a sheet which acts as the top level Summary of the project where the subactivities in the Detailed Breakdown are rolled up to a single line item. The Detailed Breakdown has numerous columns of cost and price information but the Summary sheet has just a few columns (see the attached simplified example). That means I need to enter formulas for each top level summary line to sum the Price and Cost. In the attached example that means that in the Summary tab the formula in Cell B2 is =SUM('Detailed Info'!B3:B7), but then I need to repeat that for Cell D2 =SUM('Detailed Info'!H3:H7) (or I copy across the formula in B2 and manually amend the column reference) but this is a very laborious process for hundreds of lines.

    Surely there must be a formula or method whereby I can reference the formula in B2 but automatically change the column that is being referenced (similar to OFFSET) or something?

    Apologies if the above doesn't clearly explain what I mean - I am happy to clarify.

    Many thanks in advance for any advice anyone can offer.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365
    Posts
    1,248

    Re: Copy and paste a sum formula but change column reference to a specific column

    If you can add an end text (any text) in both tabs, below the last work package values, try this in D2 and copy down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Please check file attached and let us know how it goes.

    Good luck!
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-09-2020
    Location
    Glasgow, Scotland
    MS-Off Ver
    Windows 10
    Posts
    2

    Re: Copy and paste a sum formula but change column reference to a specific column

    Hi Estevaoba,

    Thank you very much for your help! That looks like it will work - i'll apply it to a more complex spreadsheet to check it will still work.

    I will let you know how it goes!

+ 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. Replies: 15
    Last Post: 10-27-2020, 10:08 PM
  2. Replies: 7
    Last Post: 10-26-2014, 06:01 PM
  3. Replies: 7
    Last Post: 11-12-2012, 02:46 PM
  4. [SOLVED] Copy and Paste a specific Column to a Column that's heading matches a particular cell
    By Rexmond in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-17-2012, 12:29 AM
  5. Copy & paste specific column based on cell reference
    By ccsmith in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-26-2011, 03:59 AM
  6. Macro for Vlookup copy from one column to next one and change column reference
    By RajivShrivastav in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-20-2010, 06:39 PM
  7. Replies: 2
    Last Post: 05-26-2009, 05:55 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