---
title: "How to determine if the value in a cell is a number or a string"
description: "Determining if a cell value is a number or a string involves using inList and regMatch functions. These functions help check numerical ranges or patterns and set severity based on matching rules in Geneos."
url: "https://docs.itrsgroup.com/docs/faq/geneos/14668345967517-geneos-how-to-determine-if-the-value-in-a-cell-is-a-number-or-a-string/index.html"
---
This demonstrates use of the **inList** and **regMatch** functions to check simple use cases to check if a cell has certain numerical values.

For example, if the value is not empty and is in the range of 1 to 10 then set it to OK.

```
if value unlike "" and inList(value, "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10") then
  severity ok
else
  severity warning
endif
```

For a more advanced check, you could come up with your regex expression for a more precise match the below example will check for pure positive whole numerical values .

Applying the rule block to the column values below will set the severity as shown:

```
if value unlike "" and regMatch(value, "^0$|^([1-9][0-9]*)$") then
  severity ok
else
  severity warning
endif
```

![Geneos - How to determine if the value in a cell is a number or a string](https://docscdn.itrsgroup.com/faq/images/geneos/14668345967517-inline-1-image.png)

Please refer to the Rules Action Alerts documentation for details.

## Further Information

- [Rules Actions Alerts](https://docs.itrsgroup.com/docs/geneos/current/processing/monitoring-and-alerts/geneos_rulesactionsalerts_tr/index.html#regMatch)


