The COMMODITY() function is designed for automatic retrieval of commodity prices directly from the website Yahoo Finance (finance.yahoo.com) by the specified exchange symbol (for example, GC, SI) and the selected date. It supports both historical quotes and real-time values.
This function is useful for creating exchange trackers in tables Excel (LibreOffice Calc) and will be helpful for investors, traders, and financial analysts.
=COMMODITY(Symbol; [Date]; [Indicator])
The COMMODITY() function is easy to use. You just need to specify a cell with the commodity code and Excel (Calc) will automatically import its exchange price for the specified date:
=COMMODITY(Symbol; Date)
We will get the following result:
In this example, the following values are used:
In this example, the following values are used:
Corresponding data from the website Yahoo Finance:
You can use the function COMMODITY() by installing the extension YLC Utilities.
After that, this function will be available in all files opened in Excel (LibreOffice Calc).