Placeholder

Customer Forum

How to return a value if any one of a series of checkboxes is ticked

Workbooks Support Posted: 2015-08-11 09:48

Sometimes you want to show a result if any one of a number of check-boxes are ticked. To do this, you can use an IF statement, together with OR. Your formula will like something like this:

IF(field_name_1 = 1 OR field_name_2 = 1 OR field_name_3 = 1, 1, NULL)

where you substitute in the names of the fields that you want to look at. This example looks at three different fields but you can look at many more, if appropriate for your report. This formula will return a 1 if any of the fields are ticked but you can return a different value if you like. Remember that if you want to return a text value you should wrap it in apostrophes so, for example, if you wanted to return the word True, your formula would like like this:

IF(field_name_1 = 1 OR field_name_2 = 1 OR field_name_3 = 1, 'True', NULL)

The formula shown won't show anything at all (ie, NULL) if none of the check-boxes are ticked but again, if you want to return a different value, simply replace NULL with what you'd prefer to see.