Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is there any way to import a Cell number into a URL with =IMPORTXML function on google sheets?

Im trying to figure out wallet balances on google sheets with the =IMPORTXML function

I have a list of wallet addresses in column A and trying to get Wallet Balances on column B

Im using the website snowtrace.io to look at wallet balances

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

So A1-A10 consists of these addresses

0x01e083E449230CE8106cEb0085e723B120F4F23b

0x48148d8F9934937e6C0a9d8D069E5dD832cd4c76

0x1d21E96710Cf7180aDe9780437D5EFa0351daFA9

0x599127561Fe9A761Ed7a1b63A515225412C76299

0xC3987A2D88cb627aaeEAb059F93F6f063816a236

0x4E2A7d0e465D8d38aA5A1852D438e60b5832C1b4

0x76790C74aba4A30308041b8e9fD81bD3DDD2fD35

0x7C34d8280b264df11a5D33a15943b249BeFF52Cf

0xf818D2464C18FCB17ea481aaa9098CF92C3A44B5

0x2bDE88c5E313808BB3349258d2a705dfd5406376

B1-B4 Would look something like this

=IMPORTXML("https://snowtrace.io/address/0x01e083e449230ce8106ceb0085e723b120f4f23b","/html/body/div[1]/main/div[4]/div[1]/div[1]/div/div[2]/div[2]/div[2]")
=IMPORTXML("https://snowtrace.io/address/0x48148d8F9934937e6C0a9d8D069E5dD832cd4c76","/html/body/div[1]/main/div[4]/div[1]/div[1]/div/div[2]/div[2]/div[2]")
=IMPORTXML("https://snowtrace.io/address/0x1d21E96710Cf7180aDe9780437D5EFa0351daFA9","/html/body/div[1]/main/div[4]/div[1]/div[1]/div/div[2]/div[2]/div[2]")
=IMPORTXML("https://snowtrace.io/address/0x599127561Fe9A761Ed7a1b63A515225412C76299","/html/body/div[1]/main/div[4]/div[1]/div[1]/div/div[2]/div[2]/div[2]")

So I was wondering if there was a way to switch out the address in the URL and use the value from cells A1-A10 into something like =IMPORTXML("https://snowtrace.io/address/"&A1)","/html/body/div[1]/main/div[4]/div[1]/div[1]/div/div[2]/div[2]/div[2]"), instead of =IMPORTXML("https://snowtrace.io/address/0x01e083e449230ce8106ceb0085e723b120f4f23b","/html/body/div[1]/main/div[4]/div[1]/div[1]/div/div[2]/div[2]/div[2]")

>Solution :

for one cell:

="https://snowtrace.io/address/"&A1

for array:

=ARRAYFORMULA("https://snowtrace.io/address/"&A1:A10)

note that IMPORTXML is not supported under ARRAYFORMULA

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading