+ Reply to Thread
Results 1 to 6 of 6

Horizontal lookup return data vertically (Index Match ?)

Hybrid View

  1. #1
    Registered User
    Join Date
    03-29-2017
    Location
    London, UK
    MS-Off Ver
    2016
    Posts
    11

    Horizontal lookup return data vertically (Index Match ?)

    I am trying to return a vertical collation of order data from a horizontal order table supplied by a client that cannot be changed. I have attempted index match, an array all to no avail.

    The order table ‘ORDER FORM’ displays the order numbers in column A and starts in row 5.

    The individual lines that I need to be returned to the ‘OrderCollate’ tab start from column R through to column BR (Although this could be extended)

    What I need is to find the related order number in column A and return the values of that row between Columns R through to BR that have values in them ignoring all blanks. I then need to return the SKU header that is in row 1 which relates to the cells that have a value;

    Eg;

    Order number 10013
    SKU Qty
    CE041301A 1
    CE041302A 1
    CEI080 2
    CE041345A 1
    CE041313A 1

    Order number 10019
    CE041332A 1

    Order number 10025
    CE041340A 1

    I have attached the spreadsheet and OrderCollate shows the results I require, but not the formula to do what I require. I will only be looking for one order number each time, we will be using this information to produce a pick/check sheet.

    Any advice would be greatly appreciated.

    Many thanks

    Richard
    Attached Files Attached Files

  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
    30,736

    Re: Horizontal lookup return data vertically (Index Match ?)

    in C20

    =IFERROR(INDEX('ORDER FORM'!$R$1:$BN$1,SMALL(IF(INDEX('ORDER FORM'!$R$5:$BN$66,MATCH($C$14,'ORDER FORM'!$A$5:$A$66,0),0)<>0,COLUMN('ORDER FORM'!$R$1:$BN$1)-COLUMN($R$1)+1,""),ROWS($A$5:A5))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    in D20

    =IFERROR(INDEX('ORDER FORM'!$R$5:$BN$66,MATCH(OrderCollate!$C$14,'ORDER FORM'!$A$5:$A$66,),MATCH(OrderCollate!$C20,'ORDER FORM'!$R$1:$BN$1,0)),"")
    Attached Files Attached Files
    Last edited by JohnTopley; 04-11-2017 at 11:34 AM.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Horizontal lookup return data vertically (Index Match ?)

    Quote Originally Posted by JohnTopley View Post
    in C20

    =IFERROR(INDEX('ORDER FORM'!$R$1:$BN$1,SMALL(IF(INDEX('ORDER FORM'!$R$5:$BN$66,MATCH($C$14,'ORDER FORM'!$A$5:$A$66,0),0)<>0,COLUMN('ORDER FORM'!$R$1:$BN$1)-COLUMN($R$1)+1,""),ROWS($A$5:A5))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    in D20

    =IFERROR(INDEX('ORDER FORM'!$R$5:$BN$66,MATCH(OrderCollate!$C$14,'ORDER FORM'!$A$5:$A$66,),MATCH(OrderCollate!$C20,'ORDER FORM'!$R$1:$BN$1,0)),"")
    John, looks like that only works for that specific code?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    03-29-2017
    Location
    London, UK
    MS-Off Ver
    2016
    Posts
    11

    Re: Horizontal lookup return data vertically (Index Match ?)

    Thanks guys, works perfectly, i have adapted for my needs, just need to work out how to retrieve data from ROWS 2 & 3 which were blank in the example i gave you.

    Thanks again.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Horizontal lookup return data vertically (Index Match ?)

    To pull out the code...
    =IFERROR(INDEX('ORDER FORM'!$1:$1,SMALL(IF(OFFSET('ORDER FORM'!$R$1,MATCH(OrderCollate!$C$14,'ORDER FORM'!A:A,0)-1,,1,COUNTA('ORDER FORM'!$R$1:$WWW$1))>=1,COLUMN('ORDER FORM'!$R$1:$BR$1)),ROWS($A$1:A1))),"")
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

  6. #6
    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
    30,736

    Re: Horizontal lookup return data vertically (Index Match ?)

    I think it works for all Order numbers pulling all codes. Try order 10024.

+ 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. Index + Match + Lookup -- return next largest date
    By bgoodsell in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-30-2015, 05:48 PM
  2. [SOLVED] Transposing data from vertical to horizontal (INDEX/MATCH)
    By johnmitch38 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-18-2015, 07:05 PM
  3. Replies: 3
    Last Post: 02-07-2014, 03:01 AM
  4. Lookup using Index & Match to Return Unique Output
    By apdiego in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-02-2013, 03:45 AM
  5. Return a value with which combo of Lookup/Match/Index?
    By erickguz in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-20-2013, 04:27 AM
  6. Replies: 0
    Last Post: 11-27-2012, 10:32 AM
  7. Lookdown cell vertically, return horizontal value
    By cereldine in forum Excel General
    Replies: 1
    Last Post: 03-02-2006, 09:10 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