Extracting Text from a string in a Cell (Excel VBA)

jimmynora

New Member
Joined
Oct 20, 2010
Messages
27
I have a range of cells that contains data in the form on strings. I need to extract a part of this string and paste it (to the empty cell on the right).

Range "AV" contains the cells with strings
I need to extract the data between "0" OR "0:" and till the end of the string in the cell OR till "1"

Can anyone show me how to do this with a Macro (VBA code) or anyway else ? Thank You

example :

(String in a cell)

shawn012k
0: james
pdf: 321
1:
pdf:
2:
pdf:

Extracted Data (pasted in the cell to the right): james
pdf: 321
 
jimmynora, I would suggest an approach along the lines of:


Excel Workbook
ABC
11shawn012k 0: jamespdf: 3211:pdf: 2: pdf:jamespdf: 3211
2shawn012k 0: james ajskajskjaksj kajsaksjaksjakjsa pdf: 321asklakslalskl1:pdf:james ajskajskjaksj kajsaksjaksjakjsa pdf: 321asklakslalskl1
3askajskajsakaskajskajsak1
4user bio1:0: asdasdas1: asdasds2:3: asdasasdasds2
Sheet1
 
Upvote 0

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,216,566
Messages
6,131,437
Members
449,652
Latest member
ylsteve

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