+ Reply to Thread
Results 1 to 5 of 5

Find Position in Table Based on Table Value

  1. #1
    Registered User
    Join Date
    09-13-2012
    Location
    Atlanta, Georgia
    MS-Off Ver
    Excel 2010
    Posts
    32

    Find Position in Table Based on Table Value

    As the title says, I'm trying to find the position of a value in a table based on a given value.

    For instance, consider I have a table of multiple company incomes for different months. I.e., company names in the column position (B1, C1, etc) and months in the row position (A2, A3, etc). In another section of the spreadsheet I use LARGE() to return the 1st, 2nd and 3rd top income values in the data range (in this case B2:C13). I would like a formula that returns the company name and month that correspond to the income values I calculate with the LARGE() function. The actual data I have is unique enough to assume none of my values will be the same (i.e., there will never be 2 data points that correspond to the max value of the range).
    Last edited by lwflip; 11-20-2013 at 11:53 AM.

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Find Position in Table Based on Table Value

    Hi,

    Could you attach a workbook with a few examples and your desired results in each case? It doesn't have to be your actual spreadsheet - a mocked-up, smaller version will suffice, provided it has enough information in to represent your real set-up.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

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

    Re: Find Position in Table Based on Table Value

    Try this...


    Data Range
    A
    B
    C
    D
    E
    1
    Company1
    Company2
    Company3
    Company4
    2
    Month1
    95
    40
    34
    21
    3
    Month2
    41
    22
    13
    46
    4
    Month3
    64
    42
    5
    90
    5
    Month4
    56
    14
    83
    11
    6
    7
    8
    Large1
    95
    Company1
    Month1
    9
    Large2
    90
    Company4
    Month3
    10
    Large3
    83
    Company3
    Month4


    Enter this array formula** in C8:

    =INDEX($1:$1,MAX(IF(B$2:E$5=B8,COLUMN(B2:E5))))

    Enter this array formula** D8:

    =INDEX(A:A,MAX(IF(B$2:E$5=B8,ROW(B$2:E$5))))

    ** 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.

    Select C8:D8 and copy down as needed.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    09-13-2012
    Location
    Atlanta, Georgia
    MS-Off Ver
    Excel 2010
    Posts
    32

    Re: Find Position in Table Based on Table Value

    Thank you Tony that worked perfectly. Also thanks for being able to decipher my vague description. I'm wrote that out on my phone and that was the best example I could come up with.

  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: Find Position in Table Based on Table Value

    You're welcome. Thanks 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. Macro to Copy Pivot Table and Paste a Regular Data Table in the Same Position
    By webfeet2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-01-2013, 06:34 AM
  2. [SOLVED] Dynamically Changing Position of Pivot Based on Size of Another Pivot Table
    By ggilzow in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2013, 02:42 PM
  3. find position of League members in Table
    By Nomadski in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-01-2012, 10:27 PM
  4. Find values position in table between two values, multiply by adjacent value
    By bradfordstl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-19-2011, 01:14 PM
  5. Find and Replace Based on a Table.
    By EggrollZ9 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2011, 11:07 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