+ Reply to Thread
Results 1 to 11 of 11

Referencing data on from sheet 2

  1. #1
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Referencing data on from sheet 2

    Hi Folks,
    I need some help with getting data from column C on sheet 2 to appear in column E on sheet 1 based on the corresponding data in column A & B on sheet 1 and coulmn A & B on sheet 2


    I know how to do this by referencing on coulmn eg below.
    =VLOOKUP(Sheet1!D5, Sheet2!F:DP,5,FALSE)

    But i don't know how to get the refrence to work with two coulmns of data.

    I have attached an Execl 2010 file

    Any help would be appreciated.
    Thank You
    Attached Files Attached Files
    Last edited by Doofus1; 06-13-2014 at 06:38 PM.

  2. #2
    Forum Contributor
    Join Date
    10-05-2012
    Location
    Washington
    MS-Off Ver
    Excel 2013
    Posts
    106

    Re: Referencing data on from sheet 2

    Doofus,
    Love the name. When i have to reference 2 cells in a lookup, I create an extra column in my lookup table where I combine the 2 values. you will see on the average tab that i added it in column c. the formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    combines the 2 cells on sheet 1 and then looks for the combo in column D on the average tab and returns the 10 year average. I have attached a revised copy of your workbook.
    Attached Files Attached Files

  3. #3
    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: Referencing data on from sheet 2

    If you only have that data as you show on Average sheet (probably not though??), it looks like you dont need to use both A and B - it looks like the Subject and Class are unique? Or could you have Bio class 1, Bio class 2 etc? If so, then the above suggestion will work fine for you, or you start getting your feet wet with INDEX/MATCH and array formulas...

    =INDEX(Average!$C$2:$C$5,MATCH(Sheet1!A2&Sheet1!B2,Average!$A$2:$A$5&Average!$B$2:$B$5,0))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    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

  4. #4
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Referencing data on from sheet 2

    Thank You Morbdetro.
    However, I am not allowed to add additional columns to sheet 2.
    I'd like to copy past and hide column C on the "Average" sheet but that would defeat the purpose of the exercise.
    But i will keep the example for my own use. It is useful.
    Thank You

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Referencing data on from sheet 2

    Try this...

    =SUMIFS(Average!C:C,Average!A:A,A2,Average!B:B,B2)

    Copy down as needed.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Referencing data on from sheet 2

    Works like a charm!!!
    Thank You!!!

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Referencing data on from sheet 2

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

  8. #8
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Referencing data on from sheet 2

    Dear Mr Valko,
    Can that formula be used with data/text as well?

    =SUMIFS(Average!C:C,Average!A:A,A2,Average!B:B,B2) - works with numbers but I cannot seem to get it to work with letters.
    I have a column of letters eg A, B, C, etc.

    What am I doing wrong?
    Thank you.

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Referencing data on from sheet 2

    The SUMIFS version will only work if returning numbers.

    This array formula** will work on text or numbers.

    =INDEX(Average!C$2:C$4,MATCH(A2,IF(Average!B$2:B$4=B2,Average!A$2:A$4),0))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

  10. #10
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Referencing data on from sheet 2

    Once again, Thank You!!

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Referencing data on from sheet 2

    You're welcome!

+ 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. Finding data in one sheet and referencing it in another sheet.
    By hello its dean in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-26-2013, 11:55 AM
  2. Formulas for referencing data from another sheet
    By lukasj13 in forum Excel General
    Replies: 3
    Last Post: 11-21-2008, 02:29 PM
  3. Replies: 8
    Last Post: 02-03-2007, 01:41 AM
  4. Replies: 2
    Last Post: 01-30-2007, 09:58 AM
  5. referencing a sheet named in a cell then using data from that sheet
    By gbeard in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-15-2005, 04:06 AM

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