extracting specific names from this data

zeugma

New Member
Joined
Dec 1, 2016
Messages
1
Hi Guys,

I have the below data in cell A1

name-john/birth-feb-name-sameer-name-deepak/birth-dec-name-mukesh-name-ryan/name-rob

I want to extract all the values against 'name' i.e. john, sameer, deepak....and so on

The actual list is a huge one so i was looking for either a formula or a macro code to do this.

Can anyone help ?
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Fennek

Active Member
Joined
Nov 21, 2016
Messages
279
Hi,

(unchecked)

use the split-function:

Code:
Sub Fen()
for i = 1 to cells(rows.count, "A").end(xlup).row
Ar = split(cells(i,"A"), "name")
msgbox ubound(Ar) & chr(10) & Ar(1) & chr(10) & Ar(2) & chr(10) & Ar(3) & chr(10) & Ar(4) & chr(10) & Ar(5) & chr(10) & Ar(6)
next i
End Sub

regards
 
Upvote 0

Forum statistics

Threads
1,191,171
Messages
5,985,068
Members
439,938
Latest member
MAlhash

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
Top