# Adding "OR" to a function

Options
✭✭

Hi there -

I have quite a complicated formula, and I'm having difficulties integrating an OR statement. The below formula works great, but I need it to find "David" OR "Chuck", where it currently is only finding David.

=SUM(COUNTIFS({MASTER TRACKING SHEET Range 3}, "CD", {MASTER TRACKING SHEET Range 2}, FIND("David", @cell) > 0, MASTER TRACKING SHEET Range 1}, AND(IFERROR(MONTH(@cell), 0) = 1, IFERROR(YEAR(@cell), 0) = 2023))) + (COUNTIFS({SE MASTER TRACKING S Range 2}, "CD", {SE MASTER TRACKING S Range 3}, FIND("David", @cell) > 0, {SE MASTER TRACKING S Range 1}, AND(IFERROR(MONTH(@cell), 0) = 1, IFERROR(YEAR(@cell), 0) = 2023)))

Thanks!

• ✭✭✭✭✭✭
Options

You would incorporate it much the same way that you have used the AND function to combine the month and year criteria.

=SUM(COUNTIFS({MASTER TRACKING SHEET Range 3}, "CD", {MASTER TRACKING SHEET Range 2}, OR(FIND("David", @cell) > 0, FIND("Chuck", @cell)> 0), MASTER TRACKING SHEET Range 1}, AND(IFERROR(MONTH(@cell), 0) = 1, IFERROR(YEAR(@cell), 0) = 2023))) + (COUNTIFS({SE MASTER TRACKING S Range 2}, "CD", {SE MASTER TRACKING S Range 3}, OR(FIND("David", @cell) > 0, FIND("Chuck", @cell)> 0), {SE MASTER TRACKING S Range 1}, AND(IFERROR(MONTH(@cell), 0) = 1, IFERROR(YEAR(@cell), 0) = 2023)))

• ✭✭
Options

@Paul Newcome, that worked - thanks so much!

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!