# The Formula Entry Bar

## Overview

<figure><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FxFdNoTRyX2esGAd2EYXH%2FFormula%20entry.gif?alt=media&#x26;token=ce57b83b-cd3d-4455-a38e-323d621ad5d6" alt="GIF showing a user entering a calculation into the Formula Entry bar. As the user types, a dropdown appears with the names of Variables and other items to choose from."><figcaption><p>Formula Entry Bar example</p></figcaption></figure>

The **Formula Entry Bar** in the Calculations step of the [**Variable**](https://help.taglo.io/variables) dialog is the fastest way to create Calculations, by typing in a formula, similarly to how you would in Excel.

## Autocomplete Dropdown

On typing any text in the Formula Entry Bar, an autocomplete dropdown will appear, as in the examples below:

| Dropdown example                                                                                                                                                                                                                                           | Details                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FvcFWbZCB7E1C17AhhOfH%2Fimage.png?alt=media&#x26;token=02dc8d76-bf9d-4835-8670-f90376670c36" alt="" data-size="original"> | <p>Typed in <mark style="color:green;"><strong>"Peri"</strong></mark><br><br>Brings up options for:</p><ul><li><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FFW6Ck7SEID1gZzAxiE3O%2Fimage.png?alt=media&#x26;token=9730500e-68d0-418f-8485-d67ed4bd5aa7" alt="" data-size="line">Adding <a href="../calculation-parts/period-references"><strong>reference to current Period</strong></a></li><li><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2F35QMm9JxFWIpeTWGhReN%2Fimage.png?alt=media&#x26;token=3f1135d5-83ff-47e0-860a-bb5bec71ae50" alt="" data-size="line"> Adding reference to an <a href="../calculation-parts/variable-references"><strong>existing Variable</strong></a> (<code>Months per period</code>)</li><li><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2F2QIbqoU3OlN2Zy9jBn8Z%2Fimage.png?alt=media&#x26;token=70717151-ef8b-43d2-9ee7-5def597065c7" alt="" data-size="line">Adding a reference to a <a href="#referencing-a-new-variable"><strong>new Variable</strong></a> named <code>Peri</code></li><li><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FsjsWpi5iI4NAaUf7u9xq%2Fimage.png?alt=media&#x26;token=ba61b650-d373-4ec3-9ca7-b4442d321bf0" alt="" data-size="line"> Adding a new <a href="../../calculation-parts/functions/advanced-functions#creating-a-lambda"><strong>Lambda</strong></a> function named <code>Peri()</code></li></ul> |
| <img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FulexiaosnFTIZ7RrxYHQ%2Fimage.png?alt=media&#x26;token=c6c9082c-4331-4e37-ae07-6c7416d3cf72" alt="" data-size="original"> | <p>Typed in <mark style="color:green;"><strong>"Month"</strong></mark><br><br>Brings up options for:<br></p><ul><li><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2F35QMm9JxFWIpeTWGhReN%2Fimage.png?alt=media&#x26;token=3f1135d5-83ff-47e0-860a-bb5bec71ae50" alt="" data-size="line"> Adding a reference to two existing Variables </li><li><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2F2QIbqoU3OlN2Zy9jBn8Z%2Fimage.png?alt=media&#x26;token=70717151-ef8b-43d2-9ee7-5def597065c7" alt="" data-size="line">Adding a reference to a new Variable named <code>Month</code> </li><li><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FEqvErA3pSSvvNSgEiQ3C%2Fimage.png?alt=media&#x26;token=38064ec9-dcea-4091-9b3e-79b053f16ee8" alt="" data-size="line">Adding a <a href="../calculation-parts/functions"><strong>Function</strong></a> (either <code>EOMONTH</code> or <code>MONTH</code>)</li><li><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FsjsWpi5iI4NAaUf7u9xq%2Fimage.png?alt=media&#x26;token=ba61b650-d373-4ec3-9ca7-b4442d321bf0" alt="" data-size="line"> Adding a new Lambda function named <code>Month()</code></li></ul>                                                                                                                                                                                                                                   |

Autocomplete options can be selected in any one of three ways:

1. Press **`Tab`** to select the first option in the list
2. Click on an option with the **Mouse**
3. Press **`Down`** (arrow key) to navigate through the list, and then press **`Enter`** to select an item

### Full list of Autocomplete option types

<table><thead><tr><th width="132.33333333333331">Symbol</th><th width="257">Type</th><th>Details</th></tr></thead><tbody><tr><td><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FI1X8fGzSKkeVO9Vv1WyX%2Fimage.png?alt=media&#x26;token=746066da-b35a-4474-a1f6-558820d83fc8" alt="" data-size="line"></td><td>Variable Reference</td><td>Creates a <a href="../../calculation-parts/variable-references#creating-a-variable-reference"><strong>reference</strong></a> to an existing Variable</td></tr><tr><td><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FcSExyXm1Agn3a3FcGZeU%2Fimage.png?alt=media&#x26;token=fdc44f44-2b94-454a-a70f-06589f49f90d" alt="" data-size="line"></td><td>Reference to New Variable</td><td>Opens a wizard to create a new Variable; Adds a reference to the new Variable once created</td></tr><tr><td><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FE6nG060VzPevzHuWuSIv%2Fimage.png?alt=media&#x26;token=632da849-81d0-4963-8b01-1429ed28a5e9" alt="" data-size="line"></td><td>Period Reference</td><td>Creates a <a href="../calculation-parts/period-references"><strong>reference to a Period</strong></a> of the Model (a date value)</td></tr><tr><td><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FJIldbFzkM2jM9CSFvfF2%2Fimage.png?alt=media&#x26;token=9b16cd8e-f77e-4824-992c-b60eac8a67df" alt="" data-size="line"></td><td>Function</td><td>Adds a (supported) <a href="../calculation-parts/functions"><strong>Function</strong></a> name and opening bracket</td></tr><tr><td><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FwKVcVvRjvWkSlpNtaSpR%2Fimage.png?alt=media&#x26;token=0a77ac24-6594-45de-8e05-098b1edec0fa" alt="" data-size="line"></td><td>Lambda function</td><td>Adds a reference to an existing <a href="../../calculation-parts/functions/advanced-functions#lambda-functions"><strong>LAMBDA</strong></a> function</td></tr><tr><td><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FsjsWpi5iI4NAaUf7u9xq%2Fimage.png?alt=media&#x26;token=ba61b650-d373-4ec3-9ca7-b4442d321bf0" alt="" data-size="line"></td><td>New Lambda function</td><td>Opens a wizard to create a new LAMBDA function, and then creates a reference to it</td></tr><tr><td><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FjbYMqhn22FySNnKaxr3z%2Fimage.png?alt=media&#x26;token=a1db9e95-9d6d-4626-9459-2ef770e9491a" alt="" data-size="line"></td><td>New Argument</td><td>Applies to <a href="../../calculation-parts/functions/advanced-functions#let-functions"><strong>LET</strong></a> and <a href="../../calculation-parts/functions/advanced-functions#lambda-functions"><strong>LAMBDA</strong></a> functions. Creates a new argument which can be referenced in subsequent sections of the function.</td></tr><tr><td><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FSpQ9Z7GmEoTxdfY2NHRD%2Fimage.png?alt=media&#x26;token=92768ea3-6cd8-49bd-be01-9548781dea93" alt="" data-size="line"></td><td>Argument Reference</td><td>Applies to LET and LAMBDA functions. References a previously defined argument.</td></tr></tbody></table>

## Referencing a new Variable

The [**Taglo interface**](https://help.taglo.io/using-taglo-software/the-taglo-interface) allows you to create and reference a new Variable from within another Variable's calculation, without having to leave the Variable that you are currently editing.

This means you can stay within your current train of thought at all times.

To do so, follow these steps:

1. Start typing a name for your new Variable in the Formula Entry Bar
2. Select the new Variable (<img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FcqxvHDr4pLHPJLcIXbqu%2Fimage.png?alt=media&#x26;token=c192b4c2-01d7-457c-a125-7fc9513ae8c3" alt="" data-size="line">) autocomplete item in the dropdown
3. A new dialog will open - edit your new Variable here
4. Click Finish in the new dialog - a reference to your new Variable will be created in the formula

## Entering Text

To enter text strings, type your text into the Formula Bar using a <mark style="color:green;">**"**</mark> character (double quotes) to indicate the start and end of the string. When you enter the second <mark style="color:green;">**"**</mark>, a Text [**Calculation Part**](https://help.taglo.io/calculations/calculation-parts) will be created.

## Entering Numbers

To enter numbers, type the number directly into the Formula Bar. Any numbers typed in will automatically be interpreted as a number.

{% hint style="info" %}
Generally, it is not advisable to hardcode numbers into Calculations. Try to create Variables for these numbers instead.<br>

There are exceptions to this rule such as the hardcoded `1` in inflation formulas like `Cost = Cost[-1] * (1 + Inflation)`
{% endhint %}

{% hint style="warning" %}
If you have a Variable name which starts as a number, this means you may not find it easy to add from the autocomplete dropdown, in which case you can use the **Add Variable Reference** <img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FP8KQWmyuqD9IyTuTNIjj%2Fimage.png?alt=media&#x26;token=71429008-be57-4e1f-abdd-0ba033fdf26a" alt="" data-size="line">button which can be found at the end of the list of Calculation Parts.
{% endhint %}
