Now you might be already aware of the countif function that most people use for their reports and excel sums. Again as I have explained in my previous blog about sumifs function, the ‘countif’ function can fetch data using one exception whereas ‘countifs’ can match up to 29 criteria.
Here,
i will demonstrate you this function with the simple example:
Example1.
Below is the
table we will be working on in this tutorial:
As you see
in the above table, we have Year, Product, country, and
total Sales. From this data table, we want to get our total sales using
different criteria available in this table.
In the above
table, we need count of Red trolley Bags in the year 2019
Here is the
formula syntax: COUNTIFS (criteria_range1, criteria1, [criteria_range2,
criteria2, criteria_range3, criteria3, … criteria_range_n, criteria_n] )”
In the above
example, since we are looking for count of product Red trolley bags in 2019.
Next, we have the first criteria range which year (2019) for us in this
example, so we can select year range from A2:A37 (in Blue color) and you need
to specify which criteria so we have selected F6 number raw which is 2019 for
us in this example. Now next is the second criteria range which is a product
name for us, so we have selected B2:B37 (In purple Color) and then criteria
itself G6 which is product Red trolley Bags in this case.
Once we are
done with the formula, we will get the value as desired (Refer to the below
screenshot)
As we were
looking for how many times Red Trolley bags comes in 2019 from our
entire table and we got the expected value in one go with this ‘countifs’
function
Here is the
image to verify if the resulted count is accurate or not.
And yes, wo
got the correct count value with this function as highlighted in the above
screenshot.
Now since we
mentioned earlier you can use as much as 29 criteria to fetch data using this ‘countifs’
function. We will show you one more example.
Example
2.
Please see
the below image where we used 3 criteria to get count from the same table used
in earlier example. What we need is count of Green trolley Bags for 2019 in UK.
And we got
the results here
That’s all.
I hope you like this tutorial and find it easy to follow.
keep
learning, keep improving.
Comments
Post a Comment