Extracting specific data from website HTML using VBA

henrysfh

New Member
Joined
Aug 11, 2021
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
hi all,

I would to extract the value in market cap(市值) from this link: NTES-S (9999.HK) 股價、新聞、報價和過往記錄 - Yahoo 財經 by VBA to a worksheet

However I have no idea to do it.

The html code is this

<td class="Ta(end) Fw(600) Lh(14px)" data-test="MARKET_CAP-value" data-reactid="81"><span class="Trsdu(0.3s) " data-reactid="82">484.112B</span></td>

I have tried to use the method of getElementsByClassName by it seems that there is no class name to let me extract it.

Could anyone help me on this? thank you very much.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi,​
as obviously there is a class name in your html code sample - kid level reading ‼ - so I wanna see what you have tried …​
 
Upvote 0

Forum statistics

Threads
1,216,101
Messages
6,128,843
Members
449,471
Latest member
lachbee

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