+ Reply to Thread
Results 1 to 9 of 9

Lookup, Index, match or something else?

  1. #1
    Registered User
    Join Date
    12-06-2016
    Location
    London
    MS-Off Ver
    2016
    Posts
    4

    Lookup, Index, match or something else?

    I'd like to create a table, the headings are pulled from data on another range on another sheet in one column. The content being the data corresponding to the heading titles from another column. The hardest part is trying to explain in enough detail what I'm after.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,169

    Re: Lookup, Index, match or something else?

    It is much easier for all if you ....

    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.

  3. #3
    Registered User
    Join Date
    12-06-2016
    Location
    London
    MS-Off Ver
    2016
    Posts
    4

    Re: Lookup, Index, match or something else?

    I've uploaded a test file, however, I can't see / find it to attach?
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-06-2016
    Location
    London
    MS-Off Ver
    2016
    Posts
    4

    Re: Lookup, Index, match or something else?

    Thanks for your help. Here's the worksheet, hopefully there's enough information to explain?

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,169

    Re: Lookup, Index, match or something else?

    In A2 of Sheet2

    =IFERROR(INDEX(Sheet1!$A$2:$A$8,SMALL(IF(Sheet1!$B$2:$B$8=Sheet2!A$1,ROW(Sheet1!$A$2:$A$8)-ROW($A$2)+1,""),ROWS($A$2:A2))),"")

    Enter with Ctrl+shift+Enter

    Copy across and down

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

    Re: Lookup, Index, match or something else?

    Put this formula in C2 of Sheet1:

    =IF(B2="","-",B2&"_"&COUNTIF(B$2:B2,B2))

    and copy down at least to the bottom of your data (it doesn't matter if you copy further - you will get a hyphen to show that the formula is active).

    Then you can put this formula in A2 of Sheet2:

    =IFERROR(INDEX(Sheet1!$A:$A,MATCH(A$1&"_"&ROWS($1:1),Sheet1!$C:$C,0)),"")

    Copy this across into B2:C2, then copy the formulae in A2:C2 down as far as you need to.

    Hope this helps.

    Pete

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

    Re: Lookup, Index, match or something else?

    Try this...

    Data Range
    A
    B
    C
    1
    Parts
    Stationery
    Cleaning
    2
    Nuts
    Paper
    Cloths
    3
    Bolts
    Pens
    Mops
    4
    Sprays
    5


    This array formula** entered in A2:

    =IFERROR(INDEX(Sheet1!$A:$A,SMALL(IF(Sheet1!$B$2:$B$8=A$1,ROW(Sheet1!$B$2:$B$8)),ROWS(A$2:A2))),"")

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

    Copy across to C2 then down until you get a row full of blanks.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Registered User
    Join Date
    12-06-2016
    Location
    London
    MS-Off Ver
    2016
    Posts
    4

    Re: Lookup, Index, match or something else?

    Thank you!

    That's very helpful.
    What if there were columns in-between description and department?
    Blanks show as 0, can anything be done to ignore the blanks, and bring everything up, would still need to be dynamic.

    Thanks again.

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

    Re: Lookup, Index, match or something else?

    Post an updated file to show us what you mean.

+ 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. [SOLVED] Index Match with Partial Match in Lookup Array
    By AliGW in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-22-2016, 03:13 PM
  2. [SOLVED] Match-Index in stead of Index-Match lookup Array among Arrays
    By Numnum in forum Excel General
    Replies: 2
    Last Post: 10-15-2015, 02:08 PM
  3. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  4. Replies: 3
    Last Post: 06-17-2013, 12:37 PM
  5. Match/Index/Lookup - Searching From Bottom to Top (A reverse lookup maybe)
    By Neutralizer in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-02-2013, 03:55 AM
  6. Replies: 7
    Last Post: 06-19-2011, 12:51 PM
  7. Using Lookup instead of Index/Match for left lookup
    By teylyn in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-07-2008, 09:20 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