+ Reply to Thread
Results 1 to 4 of 4

Searching 2 values to assign a value

  1. #1
    Registered User
    Join Date
    09-17-2006
    Posts
    2

    Exclamation Searching 2 values to assign a value

    Hi everyone,

    I requeire some help regards my database i need some help finding a suitable formula to help me assign a value by which it searches a group of values for example:

    (Sheet 1 / Main database)

    From | To | Grid
    --------------------------------------------------------
    Melbourne Airport | Broadmedows | 3
    Melbourne Airport | Kilsyth | 6
    Melbourne Airport | Reservoir | 7
    Broadmedows | Coolaroo | 2
    Broadmedows | Kilsyth | 5
    Broadmedows | Reservoir | 4

    (Sheet 2 / Calculating sheet)

    Ok this is what i mean it would search the "From" row and the "To" row and then assign the appropriate "Grid" number all that will be done in the 2nd sheet.

    If more information is needed let me know.

    Thank you for any replies.
    Last edited by john01; 09-17-2006 at 05:18 AM.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    I assume you type in the two locations and want the result to appear in sheet 2.

    If this is the case you could try the below

    It's an array so needs to be entered with Ctrl + Shift + Enter

    =INDEX('Main database'!C2:C7,MATCH('Calculating sheet'!A2&'Calculating sheet'!B2,'Main database'!A2:A7&'Main database'!B2:B7,0))

    or using sheet names

    =INDEX(Sheet1!C2:C7,MATCH(Sheet2!A2&Sheet2!B2,Sheet1!A2:A7&Sheet1!B2:B7,0))

    VBA Noob

  3. #3
    Registered User
    Join Date
    09-17-2006
    Posts
    2
    Thx m8 it worked like a charm :D

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    No problem

    VBA Noob

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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