+ Reply to Thread
Results 1 to 2 of 2

Find value in a value range in a split string

  1. #1
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Find value in a value range in a split string

    Hi guys,

    I've got a split string as follows :

    8;313;680;1182;1455;1782;2134;2496;2845;3100;3409;3792;4101;4518;4800;5069;5367;5700;5963;6275;6625;7056;7407;7700;7934;8198;8465;8838;9120;9338;9433;9675;9906;10201;10529;10770;11065;11276;11530;11736;11998;12304;
    (42 segments in total)

    These are row numbers in a sheet that determine a location.
    Now on another sheet, I have numbers ranging between 8 and 12500.
    What's the easiest way to put the right location next to the numbers in the second sheet?
    For example, if the number in the second sheet is 1560, then that's in between 1455;1782 and therefore should be marked as location 5 (1455).
    If the number in the second sheet is 3333, then that's in between3100;3409 and therefore should be marked as location 10 (3100)

    Any suggestions on how to easily tackle this?
    The split string is called "vestnum"

    Thanks in advance

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Find value in a value range in a split string

    Hi,

    I'd just add the new rows at the end of the string, then at the end convert the list into an array (Split), sort the array and convert it back to a list (Join)

    Let me know if you need example code
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

+ 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