Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8506803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:41:32+00:00 2026-06-11T02:41:32+00:00

I have a spreadsheet that has 2 columns, the first is a unique identifier,

  • 0

I have a spreadsheet that has 2 columns, the first is a unique identifier, the second is a list delineated by the ‘|’ character of people assigned to that case. I am attempting to write a macro that uses text to columns to break out the second column into multiple columns and then copy them all with the corresponding identifier to the bottom of the original columns. I am dealing with about 46,000 rows, and the result will have around 70,000 I would guess. An example is as follows:

Original Data

ColumnA ColumnB  
123     Adam | Jill | Bob
456     Brent | Bob | Betsy | Sam
789     Matt | Adam | Jill

Needed Data

ColumnA ColumnB 
123     Adam
456     Brent
789     Matt
123     Jill
456     Bob
789     Adam
123     Bob
456     Betsy
789     Jill
456     Sam
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:41:34+00:00Added an answer on June 11, 2026 at 2:41 am

    I think this should do what you want:

    Sub test()
        Dim inputRng As Range
        Set inputRng = ThisWorkbook.Sheets(1).Range("A1")
    
        Dim outputRng As Range
        Set outputRng = ThisWorkbook.Sheets(1).Range("D1")
    
        While inputRng.Value <> ""
            Dim names As Variant
            names = Split(inputRng.Offset(, 1).Value, "|")
    
            For Each nme In names
                outputRng.Value = inputRng.Value
                outputRng.Offset(, 1).Value = Trim(nme)
                Set outputRng = outputRng.Offset(1)
            Next
    
            Set inputRng = inputRng.Offset(1)
        Wend
    End Sub
    

    Adjust the inputRng and outputRng to point where you want

    All the code does is split the string value in VBA and iterate over that list then move down onto the next row. It keeps going until it finds an empty (Value == “”) cell and then stops.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an excel spreadsheet that has two columns. When I choose to save
I have an excel spreadsheet that has dates in the first column, the rest
I have an excel spreadsheet that has 2 columns. Something like this |ColA |
I have an excel spreadsheet that has about 18k rows and three columns. I
I have one Excel spreadsheet which has the following columns: Surname / First Name
I have a spreadsheet that has a list of video filenames in one column.
Let's say I have a spreadsheet that has two columns of data. For example:
I have a Google Sheets that has two columns. Second column is numbers only,
I have a Google Spreadsheet with 3 columns that are either blank or have
I have data in an Excel spreadsheet that has 10,000 rows with the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.