Extract Specific Value from Website

avinash11

New Member
Joined
Feb 19, 2016
Messages
11
Hello Experts,

I am trying to extract specific dynamic value from url. i have a code which extracts title but i am looking to extract something else.

Code:
<  HEAD  >< META http-equiv="Content-Type" content="text/html; charset=utf-8" >< TITLE >ABC Website< /TITLE >
< /HEAD >< BODY bgcolor="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" text="#003031" >< TABLE BORDER="1" WIDTH="100%" HEIGHT="100%" CELLSPACING="0" CELLPADDING="0" bordercolor="#003031" >< TR >
< td WIDTH="200" HEIGHT="100" ALIGN=center >< A HREF="http://www.abc.com" >< IMG SRC="/FS/Logo.png" >< /A >< /TD >< td HEIGHT="50" bgcolor="#003031" >< p ALIGN=center >< B >< font color="#FFFFFF" size="6" >Information< /FONT >< /B >< p ALIGN=center >< B >< font color="#FFFFFF" size="4" >ABC Website 1234 < /FONT >< /FONT >< /B >< /TD >
< /TR >

Now i want to extract ABC Website 1234 from the url

The code which works perfectly for title is below.

Function GetTitleFromURL(sURL As String)
Dim wb As Object
Dim doc As Object


Set wb = CreateObject("InternetExplorer.Application")


wb.navigate sURL


While wb.Busy
DoEvents
Wend


GetTitleFromURL = wb.document.title


wb.Quit


Set wb = Nothing
End Function

Can someone help me to get ABC Website 1234 from the url?
 
Last edited:

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi Avi
You have a problem because you want to extract data from the page and it looks like the only pointer to the data is
1st Table
1st row
2nd cell
2nd line
You have no tag name to look for but a relative position in the page, if that can change you have no way to get the text
Cheers
Sergio
 
Upvote 0

Forum statistics

Threads
1,216,745
Messages
6,132,473
Members
449,729
Latest member
davelevnt

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