I'm attempting to pull a particular option value from Yahoo! into Google Sheets. The base URL is: https://finance.yahoo.com/quote/GOOG190418C00800000
When breaking the formula up, I have to concatenate several fields into the last part of the URL. The breakdown is:
https://finance.yahoo.com/quote/
+ SYMBOL
+ DATE
+ C/P
+ PRICE
The price
has to have 5 integers, followed by a decimal point, followed by 3 integers. If the price does not fill all characters, a zero has to be inserted.
For example: 125.00 has to be 00125.000
and 47.50 would be 00047.500
.
What I'm trying to figure out is how to take a price in the format of xx.xx
or xxx.xx
and add the correct amount of 0s to complete the link.
Please let me know if my explanation above doesn't make sense or I have to add more data. Cells, where data is being pulled from, are arbitrary.