+ Reply to Thread
Results 1 to 10 of 10

index/match return data from one sheet to another

  1. #1
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    index/match return data from one sheet to another

    Hi All
    Can anyone help me with a formula please...

    I am unsure if this will be an index/match or sumproduct formula or even something else.

    I have a “cost trend” sheet which I need a formula in the red highlighted cells which will pull data from the summary tab.

    These are the matches:
    • Cost Trend Sheet match rows 5,17 and 29 with cell B1 on the “Summary” sheet (Match the Month)
    • Cost trend sheet match rows 6, 8 and 30 with columns C and D on the “Summary” sheet (Match the Actual or Budget)
    • Cost Trend sheet match column C with column B on the “Summary” sheet

    The formula will only work for one month at a time – it needs to be zero if it’s a different month to cell B1 on the “Summary” sheet

    Any suggestions how best to achieve this? I can not change any data on the “Summary” sheet.
    Attached Files Attached Files

  2. #2
    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,944

    Re: index/match return data from one sheet to another

    in D7, use this formula
    =IF(D$5=Summary!$B$1,INDEX(Summary!$B$10:$E$136,MATCH($C7,Summary!$B$10:$B$136,0),2),"")
    in E7, use this 1
    =IF(D$5=Summary!$B$1,INDEX(Summary!$B$10:$E$136,MATCH($C7,Summary!$B$10:$B$136,0),2),"")
    copy this pair to all areas

    let me know you you make out
    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

  3. #3
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: index/match return data from one sheet to another

    Hi,

    I changed the second formula to:
    Please Login or Register  to view this content.
    to pick up the budget file.

    These formulas work for "Branch1" however when I copy it down to Branch2 and Branch3 it doesnt change - is there a way to match the branch?

  4. #4
    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,944

    Re: index/match return data from one sheet to another

    oops ok sorry about the 2 that should have been a 3, and i didnt notice your sheet2 had 3 different branches

    see if the attached gives you what you need?
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: index/match return data from one sheet to another

    Hi,

    This is soo frustrating... The formula works perfectly in the file you uploaded but when I pasted it accross to my file I get the error message #REF

    Can anyone see what I am doing wrong? Example attached
    Attached Files Attached Files

  6. #6
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: index/match return data from one sheet to another

    You do not have the defined name ranges (Branch1, Branch2, Branch3) in the file you've just uploaded.

    Define these and the formula will work

    Branch1=Summary!$B$10:$G$46
    Branch2=Summary!$B$55:$G$91
    Branch3=Summary!$B$100:$G$136
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  7. #7
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: index/match return data from one sheet to another

    Hi

    I never thought to look there - if I had i would have saved 2 hours of my time, you live and learn!!

    Its highlighted a new problem...

    One of my sheets is called "Basingstoke IGU" however the named range can not contain spaces. Is there any way I can call the named ranged "BasingstokeIGU" but adapt the formula below to add the space?
    Please Login or Register  to view this content.
    Can that be done?

  8. #8
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: index/match return data from one sheet to another

    Cull out the spaces in the indirect. Hence, use ..

    Please Login or Register  to view this content.

  9. #9
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: index/match return data from one sheet to another

    Thanks ACE_XL - that did the job

    What part of the formula actually refers to the named range?

  10. #10
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: index/match return data from one sheet to another

    This gives you the defined name or 'Basingstoke IGU'
    INDIRECT("C"&ROW()-COUNTA($D$6:$D6))

    This gives the INDIRECT of the named range without the spaces
    INDIRECT(SUBSTITUTE(INDIRECT("C"&ROW()-COUNTA($D$6:$D6))," ",""))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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