+ Reply to Thread
Results 1 to 3 of 3

Multiple vertical & horizontal lookup problem

  1. #1
    Registered User
    Join Date
    06-05-2015
    Location
    Addis Ababa, Ethiopia
    MS-Off Ver
    2010
    Posts
    11

    Multiple vertical & horizontal lookup problem

    Hi

    I’m in need of a way of cross checking amount collect collected and price published. The ‘sales’ excel contains the sales data for September while the published Fares are ‘Fares’ excel.
    - The Fares are published on origin- destination basis with respect to Classes designated by alphabets.


    What I would like to do is bring the corresponding published fare of each sales line to the V column of the spreadsheet from the ‘fares’ excel using the criteria given on the G,H & I columns). Pls help me.
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Multiple vertical & horizontal lookup problem

    Use this formula in V2 of Sales.xlsx and copy down. This is an array formula. To enter an array formula, do not hit ENTER after typing the formula--use CTRL+SHIFT+ENTER.

    =INDEX([Fares.xlsx]Sheet2!$C$2:$Q$118,MATCH(H2&I2,[Fares.xlsx]Sheet2!$A$2:$A$118&[Fares.xlsx]Sheet2!$B$2:$B$118,0),MATCH(G2,[Fares.xlsx]Sheet2!$C$1:$Q$1,0))

    See attachment for implementation.

    This assumes that your two files are in the same folder. Note that there are many #N/A errors where the origin/destination combination does not exist in the Fares file.
    Attached Files Attached Files
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Multiple vertical & horizontal lookup problem

    Try this

    For the Fares workbook I used Range naming convention
    • Range(C1:Q1) = Fares_Classes
    • Range(A2:A118) = Fares_Origins
    • Range(B2:B118) = Fares_Destinations


    Calculation used in the Sales workbook

    =IFERROR(INDEX(SK_Fares.xlsx!Fares_ClassNums,MATCH(H2&I2,SK_Fares.xlsx!Fares_Origins&SK_Fares.xlsx!Fares_Destinations,0),MATCH(G2,SK_Fares.xlsx!Fares_Classes,0)),"")

    This is an array formula so you MUST press the SHIFT + CTRL + ENTER keys simultaneously in order for the formula to work

    Note for illustration, I did not use the array method of using the SHIFT + CTRL + ENTER keys to activate the formula. Try it for yourself by selecting field V2, then press the SHIFT + CTRL + ENTER keys simultaneously


    see attachments
    Attached Files Attached Files
    Last edited by Syrkrasi; 10-10-2017 at 11:09 AM.

+ 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] lookup if my lookup array with my data position is vertical and horizontal
    By daboho in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-29-2015, 05:35 AM
  2. Horizontal and vertical lookup with sum across multiple worksheets
    By janeyjanejane78 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-11-2014, 06:15 PM
  3. [SOLVED] VBA Vertical and horizontal Lookup ???
    By ciapul12 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 03-07-2014, 06:15 PM
  4. [SOLVED] Horizontal and Vertical Lookup
    By kingkong321 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-09-2014, 06:48 AM
  5. [SOLVED] Lookup a vertical and horizontal value
    By KARENKERBA in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-28-2013, 04:33 PM
  6. Horizontal and Vertical lookup.
    By rlsublime in forum Excel General
    Replies: 3
    Last Post: 09-05-2012, 05:54 PM
  7. Replies: 4
    Last Post: 11-30-2008, 04:55 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