Results 1 to 18 of 18

Split One Column at Delimiter While Copying Contents of Second Column to Populate New Rows

Threaded View

  1. #1
    Registered User
    Join Date
    07-30-2012
    Location
    california
    MS-Off Ver
    Excel 2010
    Posts
    13

    Split One Column at Delimiter While Copying Contents of Second Column to Populate New Rows

    I am having some trouble with a data set that needs some help for a small library project.

    I have several thousand rows of data and two columns, Column A and Column B.

    Column A is the record number. Column B is a string of data separated by the delimiter "|".

    I would like the data in Column B (subject) to be split by the delimiter (|) with Column A (record) to be copied each time there is a split in Column B.

    BEFORE:
    16118 DRUGS: DEFINITIONS AND THEORIES|DRUGS: TREATMENT: DESCRIPTIONS OF PROGRAMS: COMMUNITY BASED|DRUGS: PHYSIOLOGICAL ASPECTS|DRUGS: PSYCHOLOGICAL ASPECTS

    AFTER:
    16118 DRUGS: DEFINITIONS AND THEORIES
    16118 DRUGS: TREATMENT: DESCRIPTIONS OF PROGRAMS: COMMUNITY BASED
    16118 DRUGS: PHYSIOLOGICAL ASPECTS
    16118 DRUGS: PSYCHOLOGICAL ASPECTS

    I know I need to do this with a macro, but my knowledge of macros is sadly limited and any similar examples I have seen previously just did not have relevant enough material to help me understand how to adapt the responses.

    Any and all help is welcome!

    A sampling of my data.

    record subject
    16121 DRUGS: ADOLESCENCE: SURVEYS|SMOKING: ADOLESCENCE: SURVEYS|ADOLESCENCE: SURVEYS|DRUGS: ADOLESCENCE: COMPENDIA: THEORY, ATTITUDES, BEHAVIOR|DRUGS: HEROIN|DRUGS: MARIJUANA|DRUGS: HALLUCINOGENS
    16118 DRUGS: DEFINITIONS AND THEORIES|DRUGS: TREATMENT: DESCRIPTIONS OF PROGRAMS: COMMUNITY BASED|DRUGS: PHYSIOLOGICAL ASPECTS|DRUGS: PSYCHOLOGICAL ASPECTS
    16077 DRUGS: TREATMENT: DRUG THERAPY (METHADONE)|DRUGS: HEROIN
    16059 DRUGS: MISCELLANEOUS STATISTICS|PROBLEMS: MEDICAL MORTALITY|DRUGS: PROBLEMS: MEDICAL: EMERGENCY ROOMS|DRUGS: COCAINE|DRUGS: HEROIN|DRUGS: MARIJUANA|DRUGS: STIMULANTS|DRUGS: PRESCRIPTION DRUGS
    15998 DRUGS: SOCIAL POLICY|DRUGS: HEROIN|DRUGS: BIBLIOGRAPHY
    15707 DRUGS: MISCELLANEOUS STATISTICS|PROBLEMS: MEDICAL MORTALITY|DRUGS: PROBLEMS: MEDICAL: EMERGENCY ROOMS|DRUGS: COCAINE|DRUGS: HEROIN|DRUGS: MARIJUANA|DRUGS: STIMULANTS|DRUGS: PRESCRIPTION DRUGS
    Last edited by medailSacrosanct; 07-30-2012 at 06:11 PM.

Thread Information

Users Browsing this Thread

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

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