dynamically split cell into separate cells

Danny54

Active Member
Joined
Jul 3, 2019
Messages
295
Office Version
  1. 365
Platform
  1. Windows
I'm looking for a way to split comma delimited data (Tags) into separate cells.
new sheet shows the data from Tags being split by the comma and inserted into a new cell by itself having the data aligned for that row.


it would be great if headers were inserted for the cols inserted as shown in new sheet 1

Thanks

Date1Date2Date3value%OwnerInstallercolorlocalzipzonecitysysTagsNotesIDExDOWImCID
2022-08-23T05:39:20Z2021-05-27T00:49:25Z2022-08-23T05:12:36Z010JohnJohnnoflorida,kansas,new york,texas60054
2022-08-17T05:43:43Z2021-07-14T10:54:56Z2022-08-17T04:17:17Z28010JoeJoenoohio,kansas,texas87540

new sheet
Date1Date2Date3value%OwnerInstallercolorlocalzipzonecitysysTagsNotesIDExDOWImCID
2022-08-23T05:39:20Z2021-05-27T00:49:25Z2022-08-23T05:12:36Z010JohnJohnnoflorida,kansas,new york,texas60054floridakansasnew yorktexas
2022-08-17T05:43:43Z2021-07-14T10:54:56Z2022-08-17T04:17:17Z28010JoeJoenoohio,kansas,texas87540kansasohiotexas

new sheet 1
Date1Date2Date3value%OwnerInstallercolorlocalzipzonecitysysTagsNotesIDExDOWImCIDfloridakansasnew yorkohiotexas
2022-08-23T05:39:20Z2021-05-27T00:49:25Z2022-08-23T05:12:36Z010JohnJohnnoflorida,kansas,new york,texas60054floridakansasnew yorktexas
2022-08-17T05:43:43Z2021-07-14T10:54:56Z2022-08-17T04:17:17Z28010JoeJoenoohio,kansas,texas87540kansasohiotexas
 
Thanks Fluff

I took your test data as you can see below and created a new sheet. Copied your formulas and pasted them

Suggestions?


Hollingdean,and,Stanmer
#NAME?​
#NAME?​
#NAME?​
#NAME?​
#NAME?​
#NAME?​
#NAME?​
#NAME?​
#NAME?​
#NAME?​
#NAME?​
#NAME?​
Burwell
#NAME?​
#NAME?​
#NAME?​
#NAME?​
#NAME?​
#NAME?​
#NAME?​
#NAME?​
#NAME?​
#NAME?​
#NAME?​
#NAME?​
Bramley,and,Stanningley
Cupernham
Coton
Lea,Bridge
Hertford,Castle
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
That sounds as though your Excel is not fully up to date. If you type =La into a cell do you get the LAMBDA option, or just LARGE?
 
Upvote 0
In that case your Excel is not fully up to date.
Is VBA an option?
 
Upvote 0
Ok, how about
VBA Code:
Sub Danny54()
   Dim Cl As Range
   Dim Txt As String
   Dim Ary As Variant
   
   For Each Cl In Range("N2", Range("N" & Rows.Count).End(xlUp))
      Txt = Txt & "," & Cl.Value
   Next Cl
   Ary = Application.Unique(Split(Mid(Txt, 2), ","), 1)
   Range("U1").Resize(, UBound(Ary)).Value = Ary
End Sub
This will get the values from col N & put them in row 1 starting at U1
 
Upvote 0
Solution
Perfect. I ran the VBA to create the headers, then inserted James's formula to create the line items.

I also did some research on the LAMBDA function. Seems that I'm not at the Excel release level where its available yet. Looking forward to having it.

Thanks so much guys
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top