Adding "OR" to a function
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!
Answers
-
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)))
-
@Paul Newcome, that worked - thanks so much!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!