`SUMIF(test_range; condition; sum_range)`

supports regular expressions if you have enabled that option. See Regular expressions in Calc

If the cell `A1`

contains a regular expression, then you can simply use:

```
SUMIF(A23:A240, A1, B23:B240)
```

The `condition`

parameter can be cell reference, a number or string to match or an expression to match its value. It can also be a string that starts with a comparison operator.

```
SUMIF(A23:A240, "<0", B23:B240)
```

would sum the numbers in the second range for corresponding cells in the first range that are less than zero.

```
SUMIF(A23:A240, "truck", B23:B240)
```

would sum the numbers in the second range for corresponding cells in the first range that are less than zero.

Please see Conditional Counting and Summation in Calc for more information.