Issues with "OR" for multiple columns
Can someone tell me what's wrong with my formula? I know it has to do with trying to insert an "OR" in there but I've tried multiple ways and can't get it to work. Thank you in advance!
=COUNTIFS([X Project Status]:[X Project Status], "Active", OR([Y Project Status]:[Y Project Status], "Active"), [Assigned to]:[Assigned to], "Employee Name", Type:Type, <>"Admin"))
Best Answer
-
If you want the count in case either of the project statuses are Active then I doubt if you can do an OR for multiple ranges in the same COUNTIFS. However if you do have the X and Y project status columns next to each other then there is a possibility as you can define the range as [X Project Status]:[Y Project Status] and have "Active" as the criteria for both in the same COUNTIFS like,
=COUNTIFS([X Project Status]:[Y Project Status], "Active", [Assigned to]:[Assigned to], "Employee Name", Type:Type, <>"Admin")
Otherwise you may have to add two COUNTIFS,
=COUNTIFS([X Project Status]:[X Project Status], "Active", [Assigned to]:[Assigned to], "Employee Name", Type:Type, <>"Admin") + COUNTIFS([Y Project Status]:[Y Project Status], "Active", [Assigned to]:[Assigned to], "Employee Name", Type:Type, <>"Admin")
Answers
-
If you want the count in case either of the project statuses are Active then I doubt if you can do an OR for multiple ranges in the same COUNTIFS. However if you do have the X and Y project status columns next to each other then there is a possibility as you can define the range as [X Project Status]:[Y Project Status] and have "Active" as the criteria for both in the same COUNTIFS like,
=COUNTIFS([X Project Status]:[Y Project Status], "Active", [Assigned to]:[Assigned to], "Employee Name", Type:Type, <>"Admin")
Otherwise you may have to add two COUNTIFS,
=COUNTIFS([X Project Status]:[X Project Status], "Active", [Assigned to]:[Assigned to], "Employee Name", Type:Type, <>"Admin") + COUNTIFS([Y Project Status]:[Y Project Status], "Active", [Assigned to]:[Assigned to], "Employee Name", Type:Type, <>"Admin")
-
That totally worked for my countif formulas...I need to do the same for sumif and it doesn't seem to work for that...any thoughts on how to change that?
=SUMIFS([Hours/Week]:[Hours/Week],[X Project Status]:[X Project Status], "Active", [Assigned to]:[Assigned to], "Employee Name", Type:Type, <>"Admin") + SUMIFS([Hours/Week]:[Hours/Week],[Y Project Status]:[Y Project Status], "Active", [Assigned to]:[Assigned to], "Employee Name", Type:Type, <>"Admin")
-
Are you sure that the values in your column [Hours/Week] are numbers? If you have something like 2 hrs or 2h or 3 wks,, then the formula will not work and you will always get 0.
-
That was my issue! Thank you!
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!