TOP

Commodity Function

COMMODITY() Description

The COMMODITY() function is designed to automatically obtain commodity prices directly from the website Yahoo Finance (finance.yahoo.com) by the specified exchange symbol (for example, GC, SI) and selected date. It supports both historical quotes and current real-time values.

This function is convenient for creating exchange trackers in tables Excel (LibreOffice Calc) and will be useful for investors, traders, and financial analysts.


Main Characteristics of the COMMODITY Function

Syntax:

=COMMODITY(Symbol; [Date]; [Indicator])

Parameters:

Example of Use

Example 1

The COMMODITY() function is easy to use. You just need to specify a cell with the commodity code and Excel (Calc) automatically imports its exchange price for the specified date:

=COMMODITY(Symbol; Date)

We will get the following result:

Example of using the COMMODITY() function
Example of using the COMMODITY() function

The following values are used in this example:

Example 2

Example of using the COMMODITY() function
Example of using the COMMODITY() function

The following values are used in this example:

Corresponding data from the website Yahoo Finance:

COMMODITY formula usage

Download extension

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).