Home > front end >  Combining 2 arguments in COUNTIFS function and returning the total of both
Combining 2 arguments in COUNTIFS function and returning the total of both

Time:08-04

I have a large data set that lists out spaces.

I want to count the number of cells containing the values "IT closets" and "Server Rooms" and then retrieve the combined total of both.

The data set has several variations for both i.e. IT Room, IT Closet, Server Room, Server Closet etc.

I was able to count the number of cells that contained the word “IT” by using the following formula:

=COUNTIFS('Spaces Grid'!C:C,"IT*")

So my question is how do I add to this formula to include cells that contain the word “Server*”, and return the combined total of both?

CodePudding user response:

You could do something like:

=SUM(COUNTIFS('Spaces Grid'!C:C,{"it*","server*"}))

This looks for both matches and sums the results.

CodePudding user response:

if you want it to count only the cells that contain "IT closets" and "Server Rooms", you can add 2 countif statements?

=COUNTIF('Spaces Grid'!C:C,"IT closets")   COUNTIF('Spaces Grid'!C:C,"Server Rooms")

let me know if I misunderstood the question

  • Related