In mathematics or any calculation, addition is the basic function or calculation, but sometimes we need to add some data with some condition. To do the conditional addition in MS excel there is a method for this task and these are very easy as well.
So let’s
start doing SUMIF in MS Excel.
What is
SUMIF function: This function adds the cells specified by a given condition
or criteria.
Open your
MS excel file, put some data into it. For you, I have collected some data in
the file as shown in below picture.
In first
column (A) I have ‘S.No’, in second column (B) there is list of ‘Category’,
in third (C); ‘Food’, fourth (D): ‘Salesman’ and in Fifth (E)
there is ‘Sales’.
Here we
want to find the sales done by the salespersons. I want if I enter the name of
the salesperson, total sales should be calculated automatically.
Like if I
put Sonu in a cell then it should give me total sales by Sonu.
Like if I
put Tinku in a cell then it should give me total sales by Tinku.
Type
‘SUMIF’, press the ‘tab’ key, function
will be selected.
Now it is asking for
range, criteria, and sum_range.
Range : select the range ( in column) with which you want to match the criteria.
For example, in our case we want the total sales for the salesmen, so we will select range from salesmen’s name.
So I select range from D3 to D14.
Now next is ‘criteria’.
Criteria : It refers to the criteria for which SUM has to be done.
For this, I press ‘,’ then select D16 cell reference, where I will put the name of salesman for which I want the total sales.
Now comes the ‘sum_range’.
Sum_range: this is the range, which has to be summed.
I select the range from E3 to E14, since sales data is in column ‘E’.
So total sales done by Sonu is 3200, you can verify it by adding Sonu’s sales separately.
Sonu: 1000 + 800 + 600 + 800 = 3200.
Now copy the formula, do not copy the cell, copy the test in the cell only and paste in Monu like below picture.
Change the Criteria from D16 to D17 and press ‘Enter’.
So total sales done by Monu is 4900, you can verify it by
adding Monu’s sales separately.
Monu: 500 + 2000 + 400 + 2000 = 4900.
Now do the same procedure for Tinku.
Now copy the formula, do not copy the cell, copy the test in
the cell only and paste in Tinku and change the Criteria from D17 to D18 and
press ‘Enter’, like below picture.
So total sales done by Tinku is 6000, you can verify it by adding Tinku’s sales separately.
Tinku: 300 + 4000 + 500 + 1200 = 6000.
So this all was about adding data for a specific criteria using
SUMIF function in MS Excel.
No comments:
Post a Comment