0

I am trying to fetch market price from a website using importhtml & It comes in rows & columns,

=IMPORTHTML("https://www.moneycontrol.com/commodity/gold-price.html", "table", 3)

Answer for the same is multiple columns

I am able to edit it even further using the below.

=INDEX(IMPORTHTML("https://www.moneycontrol.com/commodity/gold-price.html", "table", 3), 1, 1)

But the result of the above is this in one single cell.

"Sep 15, 15:06 49814.00-204.00 (-0.41%)"

Is it possible to get only 49816?

1

1 Answer 1

1

Use regexextract(), like this:

=value( 
  regexextract( 
    importhtml("https://www.moneycontrol.com/commodity/gold-price.html", "table", 3), 
    ":\d+\s+(\d+)" 
  ) 
)
3
  • Thank you, that resolved my issue.
    – atvt
    Commented Sep 17, 2022 at 12:27
  • Can you tell me how can I scrap the LTP from this page moneycontrol.com/india/stockpricequote/finance-investment/… Unfortunately google finance doesn't track Gold SGB & I am unable to track this using google finance
    – atvt
    Commented Apr 21, 2023 at 16:25
  • Ask only one question per post. Post a new question instead. Commented Apr 22, 2023 at 7:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.