Formula or Macro Needed

it's an excel world

Board Regular
Joined
Sep 17, 2008
Messages
126
Hello all,

I have a report that I export into Excel on a daily basis. One of the columns of data contains a long sting of characters of which I only need a certain part. Each row of data in this column ends with </a>, which I want to drop off and capture all the characters prior to that until I reach the character >. An example is <a href='Default.aspx?PageID=72&PackageHdrID=206066'>1ZV5V4420601084086</a>. All I really want is the 1ZV5V4420601084086.

I wasn't sure if I should use a formula and copy it down the file or create a macro. Please keep in mind that the amount of characters prior to the > is not always the same. But each row does end with </a>. The quantity of rows per export will also very day to day.

Thank you in advance!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Sorry about that. I forgot that when I copied the HTML code it would appear as a link to you and not the actual code I am seeing. Each row appears as follows "<a href='Default.aspx?PageID=72&PackageHdrID=206066'>1ZV5V4420601084086</a>". Hopefully it works this time.

Thanks again.
 
Upvote 0
That formula is actually bringing back the HTML code itself. The formula dropped the ">" which is what I wanted, but brought back the information prior to it instead of after it. I need the information after it until you reach the </a> at the end. Hopefully that is what I stated at the start and didn't give you bad info.

Thanks again!
 
Upvote 0
Thank you. That brought back the data after the ">". Is there something that can be added to the formula to drop off the "</a>" at the end?

Thanks again!
 
Upvote 0

Forum statistics

Threads
1,224,589
Messages
6,179,744
Members
452,940
Latest member
rootytrip

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