Your problem is to do with the difference between relative and absolute references.
Relative references change when you copy a formula from one cell to another. If you enter =A1
in B1 and copy it to B2 it will now be =A2
.
Absolute references don't change when you copy them. Enter =$A$1
in B2, then copy it to B2 and it will still be =$A$1
A "$" before the column reference anchors the column. A "$" before the row reference anchors the row. A $ before both anchors a specific cell.