+ Reply to Thread
Results 1 to 8 of 8

lookup a single value and return items in multiple columns

  1. #1
    Forum Contributor
    Join Date
    03-09-2014
    Location
    Telford
    MS-Off Ver
    Microsoft 365
    Posts
    101

    lookup a single value and return items in multiple columns

    I'm trying to lookup a large data(350,000 rows, 15 columns), based on value in column A, and populate the related information under the headings in column B, C, D..... Basically I've been tasked to retrieve all the information about 2000 names randomly selected from the database. Any help will be much appreciated. Attached is a sample.
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,792

    Re: lookup a single value and return items in multiple columns

    Put this formula in B19:

    =IFERROR(INDEX(B$3:B$7,MATCH($A19,$A$3:$A$7,0)),"")

    Copy across into C19:M19, then use the Format Painter icon to copy the formats from B3:M3 into B19:M19. Then you can copy B19:M19 down as far as you need to.

    Hope this helps.

    Pete

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,127

    Re: lookup a single value and return items in multiple columns

    Copy into B19, drag across and down as need. You many need to adjust the formats of the date and amount columns.

    =IFERROR(INDEX(B$3:B$7,MATCH($A19,$A$3:$A$7,0)),"")


    Once I posted, I saw, Ha Ha, that I'd been bto it!!
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,792

    Re: lookup a single value and return items in multiple columns

    Quote Originally Posted by Glenn Kennedy View Post
    Once I posted, I saw, Ha Ha, that I'd been bto it!!
    By five minutes, Glenn - must type faster !!

    Pete

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,127

    Re: lookup a single value and return items in multiple columns

    Normally I refresh before I post, but I've been away for a holiday and forgot.... Y'er just tooo quick

  6. #6
    Forum Contributor
    Join Date
    03-09-2014
    Location
    Telford
    MS-Off Ver
    Microsoft 365
    Posts
    101

    Re: lookup a single value and return items in multiple columns

    Guys, thanks for the quick response, really looks good!

  7. #7
    Forum Contributor
    Join Date
    03-09-2014
    Location
    Telford
    MS-Off Ver
    Microsoft 365
    Posts
    101

    Re: lookup a single value and return items in multiple columns

    If I may ask, what if I want the formula to ignore duplicate names?

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,792

    Re: lookup a single value and return items in multiple columns

    This link shows how you can do that using an array formula:

    http://www.get-digital-help.com/2009...om-one-column/

    However, if you really have 350,000 records, then it would probably be better to look for a VBA solution.

    Hope this helps.

    Pete

+ 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. Lookup multiple values in different columns and return a single value
    By tanyael in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 07-18-2014, 10:41 AM
  2. Replies: 3
    Last Post: 04-08-2014, 03:11 AM
  3. [SOLVED] Return multiple items from two and three lookup values
    By bjnockle in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-12-2013, 01:14 PM
  4. Replies: 10
    Last Post: 02-19-2013, 12:05 PM
  5. Replies: 2
    Last Post: 08-31-2006, 03:06 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