TOP

Function Commodity

COMMODITY() Description

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.


Main Characteristics of the Function COMMODITY

Syntax:

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

Parameters:

Example Usage

Example 1

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:

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

In this example, the following values are used:

Example 2

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

In this example, the following values are used:

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


This function is also available in the following extensions: YLC FunctionsYLC Utilities

The YLC Utilities menu in LO Calc

The YLC Utilities menu in LO Calc

The YLC Utilities menu in Excel

The YLC Utilities menu in Excel