+ Reply to Thread
Results 1 to 1 of 1

Match zones based on certain conditions VBA

  1. #1
    Registered User
    Join Date
    03-06-2014
    Location
    Center, Eastland
    MS-Off Ver
    Excel 2010
    Posts
    10

    Match zones based on certain conditions VBA

    Hello to all,

    I have the following table.

    In column A I have the Country Codes values and in column B corresponding description for each value (ZONE).

    In Column D I have a list of numbers for which I want to look for the closest value in column A and if found put in column E the corresponding description (ZONE). The values in column E (ZONE) are the output desired for the input NUMBERS in D.

    The basic condition is look the prefix, if a number in A is the prefix of a number in D (or vice versa), so the ZONE for the number in D should be the corresponding to that number in A.

    Is there are more than one similar or exact matches, then the zone to select would be the first sorted ascending and if there is an exact match then zone would be that match exactly.

    I hope make sense

    COUNTRY CODE ZONE NUMBERS ZONE
    599 ANT 124 BRB45
    61 AUS 12462 BRB5
    124 BRB45 1246 BRB7
    124622 BRB5 33 FRA1
    1246 BRB7 3375012 FRA1
    124623 BRB8 187635 JAM
    124624 BRB92 18763044 JAM
    237 CMR 23092 MUS
    358 FIN 3162 NLD
    33750 FRA1 49185 NOT FOUND
    33751 FRA2 51078 NOT FOUND
    334 FRA3 1721 SXM2
    1876 JAM
    230 MUS
    31 NLD
    65 SGP
    1721 SXM2
    1721 SXM4
    1 USA

    Thanks for any help.
    Last edited by Severduf; 03-29-2019 at 03:12 PM.

+ 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] IF Function based on 2 conditions to either Match or replace
    By AlexShip in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-12-2017, 11:56 AM
  2. match numbers based on conditions and show the difference
    By coolmob in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-28-2017, 02:05 PM
  3. [SOLVED] INDEX MATCH based on two Field Conditions
    By naveeddil in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 04-08-2016, 01:09 AM
  4. [SOLVED] Code to Copy Rows from 3 zones based on min/max value,and paste in next empty Target row
    By david gonzalez in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-08-2014, 02:29 AM
  5. Find totals based on zones, status and age from data set
    By djarcadian in forum Excel General
    Replies: 2
    Last Post: 07-02-2014, 04:16 PM
  6. Time Zones function based on Area Codes
    By bigjess007 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-01-2013, 12:40 PM
  7. Find 2 types of value based on 3 match conditions
    By Elza in forum Excel General
    Replies: 9
    Last Post: 11-02-2012, 03:03 PM

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