+ Reply to Thread
Results 1 to 8 of 8

Copy formula BUT change spreadsheet Name

  1. #1
    Registered User
    Join Date
    05-28-2013
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    12

    Copy formula BUT change spreadsheet Name

    Hi,

    I have a totals spreadsheet which contains copied formulas but I have to individually change the spreadsheet reference.
    How can I auto change the spreadsheet reference but keep the formulas?

    The spreadsheet names are months/dates (i.e. JAN15, FEB15, MAR15, APR15 & so on)
    The Formula I'm using is like this:

    JAN15 TOTALS (CELL B17)
    Column C/ROW 18........
    ='JAN15'!$G$2+'JAN15'!$G$14+'JAN15'!$G$26+'JAN15'!$G$38
    Column C/ROW 19.........
    ='JAN15'!$G$3+'JAN15'!$G$15+'JAN15'!$G$27+'JAN15'!$G$39
    Column C/ROW 20.........
    ='JAN15'!$G$4+'JAN15'!$G$16+'JAN15'!$G$28+'JAN15'!$G$40

    IN FEB15 TOTALS (CELL C17)
    Column B/ROW 18........
    ='FEB15'!$G$2+'FEB15'!$G$14+'FEB15'!$G$26+'FEB15'!$G$38
    Column B/ROW 19.........
    ='FEB15'!$G$3+'FEB15'!$G$15+'FEB15'!$G$27+'FEB15'!$G$39
    Column B/ROW 20.........
    ='FEB15'!$G$4+'FEB15'!$G$16+'FEB15'!$G$28+'FEB15'!$G$40

    It goes right through to DEC15.... I want to know how to copy the formula across but have the spreadsheet name change.
    March totals collected from March Spreadsheet
    April totals collected from April Spreadsheet & so forth.
    Last edited by michaelaz21; 03-04-2015 at 04:58 PM. Reason: [SOLVED]

  2. #2
    Registered User
    Join Date
    02-28-2015
    Location
    Brazil
    MS-Off Ver
    2010
    Posts
    21

    Re: Copy formula BUT change spreadsheet Name

    dear,

    send the attached...maybe we could help you...

  3. #3
    Registered User
    Join Date
    05-28-2013
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Copy formula BUT change spreadsheet Name

    I should have done that before. lol
    Thank you for looking at it for me!!
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-28-2015
    Location
    Brazil
    MS-Off Ver
    2010
    Posts
    21

    Re: Copy formula BUT change spreadsheet Name

    Ok, donīt worry,

    attached you will find my solution for this..

    I hope help...
    Attached Files Attached Files

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Copy formula BUT change spreadsheet Name

    1st, make sure that ALL your row headings match. For instance in Totals2 A5, you have "NV FOLLOW UPS", but in the Month tabs for the same thing, you have "NV " (Note the extra training spaces)

    Once you have fixed that, you can use this, copied down and across...
    =SUMIF(INDIRECT("'"&LEFT(B$3,3)&"14'!A2:A43"),$A4,INDIRECT("'"&LEFT(B$3,3)&"14'!G2:G43"))

    For 2015, change the bolded part from 14 to 15
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    05-28-2013
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    12

    Thumbs up Re: Copy formula BUT change spreadsheet Name

    Thank you so much!!
    You've saved me a lot of time on manually entering all this data.

    I really appreciate your help!!

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Copy formula BUT change spreadsheet Name

    Just out of curiosity, which 1 worked for you?

  8. #8
    Registered User
    Join Date
    05-28-2013
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Copy formula BUT change spreadsheet Name

    I went with adjusting the names as suggested below & then used:
    =SUMIF(INDIRECT("'"&LEFT(B$3,3)&"14'!A2:A43"),$A4,INDIRECT("'"&LEFT(B$3,3)&"14'!G2:G43"))

    I had to manipulate it a little for the 2015 totals as it came up with "REF!"...
    I also realised that I had included an extra search field (WOF Due) for 2015.

    So, for 2015 On-wards I used the formula below & then copied down & across as suggested....
    =SUMIF(INDIRECT("'"&LEFT(B$16,3)&"15'!A2:A47"),$A17,INDIRECT("'"&LEFT(B$16,3)&"15'!G2:G47"))

    Works an absolute dream!!

    Thankyou again
    Michaela

+ 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. Need formula to copy data in spreadsheet
    By jfishtx in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-26-2013, 06:45 PM
  2. [SOLVED] copy from a cell in one spreadsheet to another only if there is not a formula.
    By Turtleman10 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-22-2013, 03:49 PM
  3. [SOLVED] Copy formula to the next cell for a multiple spreadsheet calculation
    By Closet Coder in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-23-2012, 02:15 PM
  4. [SOLVED] Change Year Date In A Formula Throughout The Spreadsheet
    By Autumn Dreams in forum Excel General
    Replies: 3
    Last Post: 06-02-2006, 09:15 PM
  5. Change Year Date In A Formula Throughout The Spreadsheet
    By Autumn Dreams in forum Excel General
    Replies: 0
    Last Post: 06-02-2006, 11:40 AM

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