Closed Thread
Results 1 to 2 of 2

VBA split according to two distinct rules

  1. #1
    Registered User
    Join Date
    04-27-2020
    Location
    Honolulu
    MS-Off Ver
    2017
    Posts
    5

    VBA split according to two distinct rules

    Hi guys,

    I would like to ask for advice that would help me to get TWO options very similar codes which do the following:
    1) Code (perhaps do until loop?), which splits the data from column “S” of the sheet “Address” and populates these unique 1-5 string location in between the column J and N of the sheet “destination”, where each string of the 1-5 string address is being placed into separate (relevant) column, while each unique address sits on the separate line. As implied, the code should run until it inspects all the strings within the relevant row of the cell S within “Address” sheet. The example of the possible structure of 3-5 string locations can be found attached (sheet “address”) along with how these should be populated (sheet “destination”).

    2) Code which does the same as above, BUT treats the string containing street details as “as unstructured” placing this type of input in one column – i.e. disregarding the need for a split due to variability of the format and lacking pattern. The “classic” 1-3-string input (i.e. country, region, city OR city, country OR country only) shall still be populated into relevant cells. Please see the example in “destination 2” tab.


    Please note the “location country should always be populated (i.e. in scenario 1 as well as 2) as this is a mandatory/structured input (always sits at the end of the string). Also, please note the attached is just sample and the code should be dynamic (i.e. applicable to bigger data samples)

    Attached please see the examples for better illustration.

    Kind regards,

    Salasnik
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: VBA split according to two distinct rules

    Administrative Note:

    Welcome to the forum.

    Unfortunately, this is a duplicate thread, and you are allowed only ONE thread per issue here.

    Please see Forum Rule #5 about thread duplication.

    The administrator will close this thread soon, but you may continue here in the original thread: https://www.excelforum.com/excel-pro...lp-needed.html
    Best Regards,

    Kaper

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 11
    Last Post: 07-20-2017, 11:26 AM
  2. [SOLVED] formula or vba to split data column into 2 distinct column
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-20-2016, 02:33 PM
  3. vba to extract & split& trim one cell data to distinct cells on two worksheets
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-02-2016, 01:48 PM
  4. conditional formatting rules for a cell on sheet 1 based on rules from sheet 2
    By jsard in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 08-15-2013, 09:22 AM
  5. [SOLVED] Outlook 2010 - Creating Rules - Rules Constant
    By Jack7774 in forum Outlook Formatting & Functions
    Replies: 3
    Last Post: 03-18-2013, 03:48 PM
  6. Conditional formatting rules split up when copying rows
    By finny388 in forum Excel General
    Replies: 1
    Last Post: 02-29-2012, 02:26 PM
  7. Split a list of values with rules
    By lfhomet in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-21-2009, 04:13 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