+ Reply to Thread
Results 1 to 4 of 4

Return a value based upon two variables

  1. #1
    Registered User
    Join Date
    08-14-2012
    Location
    Washington, USA
    MS-Off Ver
    Excel 2007
    Posts
    29

    Return a value based upon two variables

    I am trying to return a value based upon two variables.

    On Sheet 1, A7 and A8 are variables based upon customer input. The pricing for these two variables are on Sheet 2 column E. I need to have Sheet 1 C8 reflect the value pulled from Sheet 2 column E

    Sheet 1
    -------A--------B---------C
    7---Jeans
    8---Blue


    Sheet 2
    -------A--------B-------E
    12---Jeans---Red----1111
    37---Jeans--Green---2222
    85---Jeans----Blue----3333
    97---Slacks---Green--4444
    100--Slacks---Blue----5555

    Sheet 1 C8 should be 3333.

    I tried to make a formula that I thought would work:

    =INDEX(Sheet2!E$1:E$100,MATCH(1,INDEX((A7=Sheet2!A$1:A$100)*(A8=Sheet2!B$1:B$100),0),0))

    I am getting a #N/A in C8 so something is not right.

    Any help would be greatly appreciated.

  2. #2
    Registered User
    Join Date
    04-04-2013
    Location
    Iron Mountain, MI
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Return a value based upon two variables

    Could you do something like this? Add a cheater column D to combine the data in the 2 rows on Sheet1. Then on the price sheet, also add a cheater column to do the same and pull in the price Sheet2(E & F). Then you can do a vlookup.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-14-2012
    Location
    Washington, USA
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Return a value based upon two variables

    Never mind I figured it out. I had some cell merging going on.

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

    Re: Return a value based upon two variables

    Quote Originally Posted by liquidtrails View Post

    Sheet 1
    -------A--------B---------C
    7---Jeans
    8---Blue


    Sheet 2
    -------A--------B-------E
    12---Jeans---Red----1111
    37---Jeans--Green---2222
    85---Jeans----Blue----3333
    97---Slacks---Green--4444
    100--Slacks---Blue----5555
    If the data being returned in a numeric value then you can use this:

    =SUMIFS(Sheet2!E$1:E$100,Sheet2!A$1:A$100,A7,Sheet2!B$1:B$100,A8)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. Return a value based on two variables
    By celphtitled in forum Excel General
    Replies: 5
    Last Post: 04-20-2014, 04:48 PM
  2. Return a vaule based on Multiple variables
    By cooperman82 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-04-2012, 06:50 AM
  3. Excel 2007 : Return all values based on 2 variables
    By Aggie81 in forum Excel General
    Replies: 3
    Last Post: 07-26-2010, 11:34 PM
  4. IF 3 variables then return a specific #
    By rkerns1 in forum Excel General
    Replies: 6
    Last Post: 04-01-2009, 06:32 PM
  5. Return a date based on 2 variables.
    By Mishka1 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-21-2007, 06:56 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