A range of general ledger accounts can be specified wherever an Exact Online general ledger account is available in an Excel formula. The totals are returned for all general ledger accounts in the specified range. This functionality is available in formulas such as `I_EOL_BAL_PDE_CLOSE`, which retrieves balances in real time from Exact Online, including any opening balance as of the selected period end.
The range can be specified using the following rules:
- Empty: no filtering is applied.
- Exact match, for example `8000`: only general ledger account `8000` is included.
- Combination of explicit values, for example `8001,8015`: only these listed general ledger accounts are included.
- Range, for example `8000-8015`: all general ledger accounts between the lower and upper bound are included.
- Wildcard for any sequence of characters, for example `8*`: all general ledger accounts starting with `8` are included.
- Wildcard for a single character, for example `8___`: all four-character general ledger account codes starting with `8` are included.
- Combination of patterns, for example `4*,7*`: all general ledger accounts matching either pattern are included.
These balances are retrieved in real time when the formula is calculated, so the outcome reflects the most current financial data in Exact Online.
One important limitation is that these wildcard ranges and combinations apply to the general ledger account selection itself, but not to multiple administrations or other selection criteria. When consolidating across multiple Exact Online companies, each company still needs to be included separately in the Excel formula and then summed.
## Examples
To retrieve balance for one specific general ledger account:
```
I_EOL_BAL_PDE_CLOSE(; 2020; 1; 12; "8000")
```
To retrieve the combined balance for accounts `8001` and `8015`:
```
I_EOL_BAL_PDE_CLOSE(\; 2020; 1; 12; "8001,8015")
```
To retrieve the combined balance for all accounts from `8000` up to and including `8015`:
```
I_EOL_BAL_PDE_CLOSE(; 2020; 1; 12; "8000-8015")
```
To retrieve the balance for all accounts whose code starts with `8`, such as revenue accounts:
```
I_EOL_BAL_PDE_CLOSE(; 2020; 1; 12; "8*")
```
To retrieve the same for account schemes that use four-digit account codes:
```
I_EOL_BAL_PDE_CLOSE(; 2020; 1; 12; "8___")
```
To retrieve the combined balance for all accounts starting with `4` and all accounts starting with `7`:
```
I_EOL_BAL_PDE_CLOSE(; 2020; 1; 12; "4*,7*")
```
A specific general ledger account can also be excluded by subtracting it separately. For example to retrieve the balance of all accounts starting with `8`, except account `8999`:
```
I_EOL_BAL_PDE_CLOSE(; 2020; 1; 12; "8*") - I_EOL_BAL_PDE_CLOSE(; 2020; 1; 12; "8999")
```