+ Reply to Thread
Results 1 to 16 of 16

Using two cell values to find a result in a table

  1. #1
    Registered User
    Join Date
    04-06-2016
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    18

    Using two cell values to find a result in a table

    Hello. I'm struggling to get my head around a complex task in Excel and think I might be overcomplicating matters! Any help to stop me wasting time would be much appreciated.

    I have a large database of customer information in worksheet 1.
    Column AD = BrandContract
    Column N = Throughput

    I have a matrix in worksheet 2 that shows how much we should invoice a customer depending on their throughput and BrandContract
    It has the BrandContract in column A, and then various throughput range targets in columns B-F (for example 0-99, 10-299, 300-499 etc.).

    So, I now need to get a column that looks up the value in column AD to establish which row of worksheet 2 to look at...and then sees which of the value ranges in columns B-F it falls in to. It would return the header/title for the corresponding column.

    I'm fine with standard VLOOKUP functions but really want to try and learn/understand how I add in this extra variable.

    Any help would be very much appreciated.

    Thank you
    Attached Files Attached Files
    Last edited by curdley; 04-07-2016 at 06:27 AM. Reason: change attachment

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    365
    Posts
    5,778

    Re: Using two cell values to find a result in a table

    INDEX/MATCH/MATCH sounds like it will do what you need here.
    Far easier to post a sample workbook with expected results than have willing volunteers recreate your workbook from assumption.
    So if you could upload a (desensitized version, if necessary) you'll get your answer far sooner.

    BSB

  3. #3
    Registered User
    Join Date
    04-06-2016
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: Using two cell values to find a result in a table

    Thank you for the tip, BSB. I'm new to the world of forums I will attempt to attach a sample now...

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex
    MS-Off Ver
    365
    Posts
    5,778

    Re: Using two cell values to find a result in a table

    Stock blurb on attaching a workbook below:

    BSB


    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window (or use the paperclip icon).

  5. #5
    Registered User
    Join Date
    04-06-2016
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: Using two cell values to find a result in a table

    Okay....hopefully you can see an attachment now.... thanks again for helping

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    46,892

    Re: Using two cell values to find a result in a table

    Quote Originally Posted by curdley View Post
    Okay....hopefully you can see an attachment now.... thanks again for helping
    Can you upload a spreadsheet with details of what you want and some expected outcomes? I cannot work out what's what in the one you've just posted!
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  7. #7
    Registered User
    Join Date
    04-06-2016
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: Using two cell values to find a result in a table

    Apologies again! Okay, I've hidden most of the worksheet and just shown the columns in question. I want the 'tier achieved' to be formatted to look up the Brand/Contract in worksheet 2, see which tier the throughput falls in to and fill the name of the tier in worksheet 1.
    I'm sorry that I'm rubbish at explaining this. I'll get the hang of it....

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    46,892

    Re: Using two cell values to find a result in a table

    How do I know from that number which row to look in? Or should there be another column visible?

  9. #9
    Registered User
    Join Date
    04-06-2016
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: Using two cell values to find a result in a table

    So, in sheet 1, you can see a code in column N that you then look up in worksheet 2 (in column A). Then, you take the throughout in worksheet 1 and read across the matrix in worksheet 2 to see which tier it falls in to. I want to then see the name of the tier (Tier 1, Tier 2 etc) in column AE on worksheet 1

  10. #10
    Registered User
    Join Date
    04-06-2016
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: Using two cell values to find a result in a table

    So, you use the value in column AD to find the row in worksheet 2....and the value in column N to find the column in worksheet 2

  11. #11
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Using two cell values to find a result in a table

    Perhaps this will work for you. The ranges given on Sheet2 had to be converted to just the upper limits.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  12. #12
    Registered User
    Join Date
    04-06-2016
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: Using two cell values to find a result in a table

    Oh my goodness! I don't have my laptop on me to transfer this to the real doc but it looks like you've done it!! Thank you so much. I'll come back tomorrow to confirm it work.
    The great thing for me is that I understand what you've done...so ill know how to do it next time

  13. #13
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Using two cell values to find a result in a table

    This works better. Insert a column of zeros like this:
    A
    B
    C
    D
    E
    F
    G
    2
    Tier1 Tier2 Tier3 Tier4 Tier5
    3
    A1
    0
    99
    199
    299
    399
    5,000
    4
    A2
    0
    49
    99
    199
    299
    500
    5
    A3
    0
    99
    199
    299
    399
    1,000
    6
    A4
    0
    99
    199
    299
    399
    1,000
    7
    A5
    0
    99
    199
    299
    399
    1,000
    8
    B1
    0
    299
    599
    999
    1,999
    10,000
    9
    B2
    0
    99
    199
    299
    399
    1,000
    10
    B3
    0
    99
    199
    299
    399
    1,000


    Then, enter this in Sheet1!AE2 and fill down
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    A bit of an explanation:
    Start in the middle and work outwards
    INDEX(Sheet2!$B$3:$G$10,MATCH(AD2,Sheet2!$A$3:$A$10,0),0) This INDEX Sheet2!$A$3:$G$10 contains
    all the rows and columns of data. So, a ROW and COLUMN has to be determined. This part of the formula returns the row number as in a "normal" formula.

    When surrounded by MATCH(N2,......,1) This is in the COLUMN element of the first INDEX.
    Therefore MATCH(N2,INDEX(Sheet2!$B$3:$G$10,MATCH(AD2,Sheet2!$A$3:$A$10,0),0),1) returns the column number of the value of N2.
    Attached Files Attached Files

  14. #14
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Using two cell values to find a result in a table

    The formula can have the ,, reduced to just a comma.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    04-06-2016
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: Using two cell values to find a result in a table

    Thank you so much for your help. This worked perfectly.

  16. #16
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Using two cell values to find a result in a table

    Thank you for the feedback.

+ 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: 3
    Last Post: 02-09-2016, 05:08 AM
  2. [SOLVED] Find result what is times of value of repeat for same repeated values
    By johnodys in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-06-2013, 10:48 AM
  3. How to find pivot table field values of active cell?
    By Iain21 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-14-2012, 09:39 AM
  4. [SOLVED] Find date in horizontal table and add values below in one cell
    By Taktiker in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-19-2012, 04:47 PM
  5. Find a Value In A Table of Cell Each With More Than 2 Values Separated By Commas
    By Misha322 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-28-2012, 02:42 PM
  6. Replies: 18
    Last Post: 01-28-2011, 05:19 PM
  7. Comparing a value to table of values for result
    By tkendell in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-01-2009, 11:12 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