The way your formula is written just means that if you drag that formula to the left or the right, it will still look at columns A and B, If you remove the $ then when you drag the formula to the left or the right the entire formula will change what columns it is looking at. The $ represent Absolute References, in other works whatever following the $ will not change no matter where you place the formula.
The $
will also lock in the rows if seen before the Row number also.
A1 = Row and Column Will change when the formula is dragged around
$A1 = The Row number will change but not the Column reference
A$1 = the column may change but the row will not
$A$1 = The Formula will always reference `A1` even when filled down or across.
NOTE: Even with Absolute Referencing on, excel will modify the formula when columns are either inserted or deleted.
For an example see Here
Or
For more information please see Here Or Here
The SumIf Function
the sytax of the SumIf Function is:
SUMIF(range,criteria,sum_range)
Following this, syntax, You are creating a a Logical Statement (True or False) where the cells in the range specified, are compared to the criteria you provide.
If no operator is supplied but only a Number or Text value then the cells in the range provided will have to equal the criteria.
You can also use operators like the <
and the >
symbols.
Once you have the Range you want to test and the criteria by which you would like it tested the last part of the function is the sum_range here you give the formula a range of cells that it can actually sum.
The function will sum the cells in the sum_range where the cells in the range from the first p[art of the syntax meet the criteria.
=SUMIF($A:$A,$A2,$B:$B)
So given your sample above. It is giving the sum of all the Number in B:B
where the cell in A:A
on the same row is equal to the value in A2
.