> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.custompricecalculator.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Data Lookup

*is element allows your customers to enter two inputs and based on those inputs the calculator will look up the value from a table and use it in a formula.*

*You can also use the inputs as values in the formula and not only the matched value.*

## This video provides a step-by-step guide to the process.

*Note: this video was recorded on the previous version of the price table screen. The steps and the logic are unchanged, but the screen now shows your settings and your table side by side. Follow the written steps below for the current layout.*

${frame}[](https://www.youtube.com/embed/Wj1iUBHUm8g)

**Step 1: Add the element**

Click **+ Add element**, then select **Data Lookup** from the list. The element will be added to your calculator.


![](https://storage.crisp.chat/users/helpdesk/website/-/6/7/3/d/673d74301cfde400/new1picker_p6glyd.png =834xauto)

**Step 2: Get to know the screen**

![](https://storage.crisp.chat/users/helpdesk/website/-/6/7/3/d/673d74301cfde400/new2editor_10r0bgd.png =824xauto)
The editor opens as one wide screen with two halves. Your **settings are on the left** and your **price table is always on the right** — you no longer need to open the table separately.

Along the top of the table you will find:

* A one-line summary of your table, for example *15 × 10 · every value is a number · both axes sorted*. This tells you at a glance whether your table is healthy.
* **Table size** — type the number of rows and columns you need and click **Update**. This is how you make the table bigger or smaller.
* **TRY IT** — test what a customer would be charged, before you save. More on this in Step 4.

**Step 3: Fill in your table**

Row 1 and column A are your headers, and they are what your customers' inputs are matched against:

* **Row 1**: the values matched against your customer's first input (Input Box 1).
* **Column A**: the values matched against your customer's second input (Input Box 2).
* **Cell A1 must stay empty.** Anything typed there is read as a header value and shifts your whole table across.

Everything else in the grid is a price.

Three ways to get your numbers in:

* **Paste from Excel or Google Sheets.** Copy the block of cells and paste it straight in — the table resizes itself to fit what you pasted.
* **Type directly.** Click a cell and start typing; you do not need to double-click first. Press **Enter** to save the value and drop to the next row, or use the arrow keys to move around, exactly like a spreadsheet.
* **Set the size first** using the Table size boxes, then fill it in.

**Header values must be plain numbers.** Write `1200`, not `$1,200` and not `1,200 mm`. The calculator reads header values as numbers, and a currency symbol or a comma stops it matching properly. Units and currency belong in your element labels, not in the table.

**Keep your header values in ascending order**, smallest first. Matching stops at the first value that fits, so a value out of order is never reached.

**Step 4: Test it before you save**

Use the **TRY IT** boxes above the table to enter a pair of values the way a customer would, and the price they would be charged appears underneath — along with the cell it came from, highlighted in green in the table.

This is the quickest way to confirm your ranges behave the way you expect, and it runs the same matching the storefront uses, so what you see here is what your customer gets.
![](https://storage.crisp.chat/users/helpdesk/website/-/6/7/3/d/673d74301cfde400/new3tryit_exfs0.png =794xauto)


**Step 5: Fix anything flagged in red**

When you click **Save Changes**, the table is checked. If something would cause customers to be charged incorrectly, the save is stopped and a red panel appears at the top naming the exact cell and what is wrong with it — for example *“$45” in E1 is read as 0, not 45. Axis values must be plain numbers.* The affected cells are outlined in red in the table.

Common things it will catch:

* A header value that is not a plain number, such as `$45` or `1,200`.
* Header values that are out of order, or the same value used twice.
* Something typed into cell A1.
* Empty cells in the middle of your table, which shift every price after them one column to the left.

Fix the cells it names and click **Save Changes** again.

*If you are editing a table you built some time ago, you may see problems listed that were already there. You can still save your other changes — but it is worth correcting them, because they affect the prices your customers are being charged today.*
![](https://storage.crisp.chat/users/helpdesk/website/-/6/7/3/d/673d74301cfde400/new4warning_uctzvz.png =780xauto)


**Ranges: how values in between are matched**

Your customer will rarely type a number that matches one of your header values exactly, so each value is matched against a **range** instead. A range runs from one header value up to just below the next one.

Take this small table as an example. Row 1 and column A are the headers; everything else is a price:

|  | 10 | 20 | 30 |
| ---- |
| **1** | 5 | 8 | 11 |
| **2** | 6 | 9 | 12 |
| **3** | 7 | 10 | 13 |

Reading across the top row:

* Anything entered from 10 up to 19 is matched against the **10** column.
* Anything entered from 20 up to 29 is matched against the **20** column.
* Anything from 30 up to the maximum value you allow is matched against the **30** column — the last column always covers everything above your final header value.
* Anything below 10 does not match at all, which is why your Input 1 **Minimum Value** should be set to your first header value.

*The same logic applies to Input 2, reading down column A.*

*Some examples based on the table above:*

| Input 1 | Input 2 | Price returned |
| ---- |
| 15 | 1 | 5 |
| 24 | 3 | 10 |
| 90 | 2 | 12 |

**Setting the minimum and maximum a customer can enter**

Each Data Lookup element has two number inputs. For each one you can set the label your customers see, the minimum and maximum values they are allowed to enter, and how many decimals are allowed. These live in the **Logic** section on the left of the editor, under **Input 1 Configuration** and **Input 2 Configuration**.

**Minimum Value**: set this to match the first value in your table — cell B1 for Input 1, and cell A2 for Input 2.

**Maximum Value**: anything entered between your last header value and this maximum is matched against the last column or row, as described in Ranges above.

**Formula based values**: you can switch an input to be driven by a formula instead of by the customer. If you do:

* Conditional display is disabled for the Data Lookup element
* The input is hidden from the calculator, as there is nothing for the customer to enter

**Step 6: Add the element to your formula**

To use the matched value in your formula, insert the element name. You can also use either of the two values your customer entered, like this:

***ELEMENT LABEL [INPUT 1 NAME]***

| Part | What to use |
| ---- |
| **ELEMENT LABEL** | The label name you provided for the Data Lookup element. |
| **INPUT 1 NAME** | The name you chose for your input. This is what is actually displayed to your customers. |

So a Data Lookup element labelled `Panel price` with a first input named `Width` gives you `Panel price` for the matched price, and `Panel price [Width]` for the number the customer actually typed.
