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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
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,214,875
Messages
6,122,040
Members
449,063
Latest member
ak94

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