SUMIF function adds all numeric numbers in a given range of cells based on one criteria. Suppose there is name in column A and amount in column B and in column A if a name is repeating more than 1 time and you want to add all the amount It have next to column then Sumif is a best formula to make your work easy.
DEFINITON INDIRECT:- INDIRECT function is used in Excel to change over a content string into a legitimate range reference. For example: if you want to lookup what value is available in cell A2 then simply use =INDIRECT(“a2”). Indirect use text reference and actually convert it to reference. So here “a2” is converted to cell(a2).
NOTE: – Make sure to change the reference according to your range (database).
FORMULA IN EXAMPLE : =SUMIF(INDIRECT(D2&”!$A$1:$B$6″),Sheet1!$F$2,INDIRECT(D2&”!$B$1:$B$6″))