Budgeting
You can make an account follow a share of another account's total and repair the formula when the other account is deleted.
Some costs are a fixed share of another cost. The `ACCOUNT` function uses the total of another account in a formula. When that total changes, KOSMA recalculates the share.
Double-click an empty **Price/Unit** cell of the account that carries the share. KOSMA opens a menu with  **Variables** and  **Functions**.
Choose  **Functions**, then  `ACCOUNT`, and click the account in the list. Each row of the list shows the account's number and name. KOSMA writes the whole call into the cell, for example `ACCOUNT("9.02")` for account 9.02, Legal & Accounting.
Always pick the account from the list. A number you type from memory can look right and still point at the wrong account.
After the call, type `*` and the share as a decimal number with a point, and set **Quantity** to 1. In the demo budget, account 9.03, Financing & Bank Costs, carries 75 per cent of account 9.02 in its **Price/Unit**:
With a total of 16,000 in account 9.02, KOSMA shows 12,000 for account 9.03.
**What the function returns.** `ACCOUNT` returns the account's total in the budget's default currency. If the account uses another currency, KOSMA converts its total. For an account with subaccounts, the function returns the sum of the subaccounts. It never returns the quantity. To use a quantity, see [use quantities in formulas](/kb/article/use-quantities-in-formulas).
An account cannot use its own total, either directly or through a chain of formulas that leads back to it. KOSMA does not save such a formula and shows one of these messages:
This formula would make the account's total depend on itself, which creates a circular reference.
This formula creates a circular reference, so the change could not be saved.
Point the formula at an account whose total does not depend on this account. A variable between the two accounts does not avoid the circular reference: KOSMA does not save an account line that uses a variable with `ACCOUNT` in its formula. No formula can use a **Subtotal** in the budget.
**If you renumber the referenced account.** KOSMA changes the number in the formula. This also applies when you use **Renumber Budget Items**. The result stays the same.
The formula keeps its text, and the cell loses its value. KOSMA frames the cell in red. When you point at the cell, KOSMA shows:
Unknown part of expression
Point the formula at another account. KOSMA recalculates the cell and removes the red frame. If you save a formula that still points at a deleted account, KOSMA shows the message Unknown Reference with **Ok**:
The expression "ACCOUNT("9.02") \* 0.75" refers to something that no longer exists. Fix the formula to clear the error.
Markdown