+ Reply to Thread
Results 1 to 3 of 3

What formula do I require for two criteria to match in order to give result?

  1. #1
    Registered User
    Join Date
    02-02-2015
    Location
    Cornwall, England
    MS-Off Ver
    2010
    Posts
    13

    What formula do I require for two criteria to match in order to give result?

    I am creating a 'Mileage Calculator' in order to deduce the reimbursable miles employees drive per week. I am using Excel and have a database of all the possible 'A-B' combinations of our local postcodes (UK), and the distance in miles between each once, for example: | PL34 0ES | PL34 0AT | 0.7 |. The user, on a different sheet, selects a starting postcode and a finishing postcode for each of the journeys from a drop down list. What formula would I use to display the distance from the database as a result of the two input postcodes? Any help MUCH appreciated. Been trying to sort this all week

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: What formula do I require for two criteria to match in order to give result?

    With:
    A1:A10 is starting range
    B1:B10 is finishing range
    C1:C10 is distance range
    D1 is dropdown of starting
    D2 is dropdown of finishing

    Try:

    =LOOKUP(2,1/((A1:A10=D1)*(B1:B10=D2)),C1:C10)
    Quang PT

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: What formula do I require for two criteria to match in order to give result?

    Hi Samuel,

    The answer depends on what your database looks like. I prefer to do these problems using a HELPER column where I join the start and end place names into a single cell. Then I like to use the VLookup function to get a distance. See the attached for the way I approach these problems.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ 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 multiple criteria in table and give row + culmn as result
    By bidsinga in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-02-2014, 03:40 PM
  2. Replies: 2
    Last Post: 09-14-2012, 12:45 PM
  3. seach and match to give result
    By prasjohn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-14-2009, 06:19 AM
  4. match 2 colomns to give result
    By semo in forum Excel General
    Replies: 2
    Last Post: 05-28-2009, 06:31 AM
  5. Provide a match from 2 cells to give a result from another
    By leefarrell in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-09-2006, 08:34 AM

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