TOP

Import of exchange rates from the Swiss Central Bank website

NBCH() Description

The NBCH() function is designed to automatically obtain the value of the official Swiss franc exchange rate directly from the Swiss Central Bank website (snb.ch) by the specified code and date.

The NBCH function significantly simplifies working with exchange rates, especially for those who work with finance or keep records in different currencies. Instead of manually entering rates, you just need to use this function to get the current data.

Also, you can use the "Official exchange rates" tool, which inserts the exchange rate for selected cells in one click.


Key Features of the NBCH Function

Syntax:

=NBCH(CurrCode; [CurrDate]; [Modifier])

Parameters:

Usage Example

Example 1

The NBCH() function is easy to use. You just need to enter the currency code and date into the corresponding cells of the formula, and Excel (Calc) will automatically obtain the current exchange rate:

=NBCH(CurrCode; CurrDate)

We will have the following result:

Example of using the NBCH() function
Example of using the NBCH() function

The following values are used in this example:

Example 2

Example of using the NBCH() function
Example of using the NBCH() function

The following values are used in this example:

How It Works?

The NBCH() function can work both in normal mode and as an array function.

To use as an array, simply enter the function in any cell, specifying the appropriate parameters. After that, you need to press Ctrl+Shift+Enter to enter the array formula and LO Calc will automatically return a table with data.

To select all cells associated with the array formula, simply select any cell in the array and press Ctrl+/.

If you need to convert an array formula to values - select the entire array and in the Data > Calculate menu select Formula to Value.

When using a date as text, it must first be converted to a real date, for example: DATEVALUE("2026-01-25").

Download extension

You can use the NBCH() function by installing the YLC Utilities extension.

After this, the function will be available in all files opened in Excel (LibreOffice Calc).


This function is 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