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
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 142 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!