+ Reply to Thread
Results 1 to 2 of 2

Retrieving data based on nth column of array and returning first column value

  1. #1
    Registered User
    Join Date
    09-26-2017
    Location
    Massachusetts
    MS-Off Ver
    2016
    Posts
    2

    Retrieving data based on nth column of array and returning first column value

    Hello,

    I am trying to figure out a good way to have excel lookup a value based on the nth column of an array and returning the first with the nth column being variable. Example:

    A B C D
    1 Output #1 #2 #3
    2 1 10 20 30
    3 2 11 21 31
    4 3 12 22 32
    5 4 13 23 33

    Input1 = #3 (but could be #1, #2, or #3 and will change based off of inputs)
    Input2 = 32
    Desired output = 3

    Input 1 will need to match the columns B, C, or D, which will return the correct column to look for Input2 in. Then within that column, find the row that contains Input2 with an output coming from A.

    I attempted to use index/match function to do this but couldn't figure it out. I know that I could break up the data and do an easy VLookup on B then A, C then A, and D then A but I feel like there is a way to do it how I want. Also, I have roughly 213 columns worth of data that would need to be done like this.

    Any help would be appreciated. Also, if this isn't possible, please let me know!
    Last edited by truck'ems; 09-26-2017 at 05:00 PM.

  2. #2
    Registered User
    Join Date
    09-26-2017
    Location
    Massachusetts
    MS-Off Ver
    2016
    Posts
    2

    Re: Retrieving data based on nth column of array and returning first column value

    Solved it!

    Using the Choose function within the index/match function allows me to find the correct column and search it based on the criteria of row 1.

+ 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: 7
    Last Post: 02-01-2016, 03:49 AM
  2. Retrieving the column data into a table based on a value in another sheet
    By laansesu in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 08-22-2015, 01:53 AM
  3. [SOLVED] Returning all the values in a column based on the column header
    By Benisato in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-10-2012, 11:19 AM
  4. Replies: 5
    Last Post: 09-12-2012, 01:27 PM
  5. Replies: 0
    Last Post: 03-22-2012, 03:08 PM
  6. Returning last name in column based on data in another column
    By somesoldiers in forum Excel General
    Replies: 1
    Last Post: 03-05-2012, 11:10 AM
  7. Retrieving value from another sheet based on column
    By kookymonster in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-24-2011, 02:59 PM

Tags for this Thread

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