So, I have been trying to build a google sheet so that I can track my crypto portfolio.
I used =importxml to get the live data from coinmarketcap.com
This is the code, where E28 is the
XPATH:=IMPORTXML("https://coinmarketcap.com/currencies/bitcoin/"; E28)
It's working perfectly since I added a button that when I click it, refreshes the prices.
Here is the problem... The data that is pulled from coinmarketcap is displayed in the cells as text, not as numbers, even though it is in fact numbers. So when I try to use the data to make my profit/loss formula it says "Function ADD parameter 1 waits for numbers, but "$40,488.71" is actually text and it can't be forced as the number"
What can I do? is it possible to turn this text into numbers? so I can use the values in my formulas?
Did I make myself clear? Regards from Brazil!!!
Try
=Value(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(IMPORTXML("https://coinmarketcap.com/currencies/bitcoin/";"//div[@class='priceValue ']");"$";"");",";"");".";","))
as you are in Brazil, you have to remove $, remove , and change . by , as decimal separator.