VBA IE question

awwcraig

New Member
Joined
Dec 1, 2009
Messages
37
I'm able to search the website html text for a specific string. I'd like to go one step further and, if that string is found, then return the word(s) that follow the found string.


Example web text:
"The player's final review: Excellent"

I would search for "final review:" and would want to return "Excellent." Is that possible?


Thanks,
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I kind of figured this out using Instr & Mid, but it's tough accounting for the different html code tags that can appear on the pages. Some have "/li" others "/span", etc.

Is there a better way?

Is it possible to get the text only w/o the html tags?


Thanks again,
 
Last edited:
Upvote 0
Also, is there a way to pull the href value based on the data-articletypeid? If so, how? I can't figure out what element tag/class/name/whatever it would be.


a tabindex="-1" class="researchHeadlineLink pageOneResearchHeadlineLink governmentsResearchHeadlineLink" id="wcwidget_f2548c1699f53727c8c44f356d6b4abe_widget_DisplaySection1__allResearchList__hlTitleFA_2" ***********="onMouseHoverPopupHandler(event)" onmouseleave="onmouseleaveHandler()" href="/REMOVED_THE_REAL_ADDRESS" data-articletypeid="9617656" data-researchid="32268601">Summary: Company./a
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,182
Members
452,615
Latest member
bogeys2birdies

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