There are 3 types of cell references in Excel.
Relative
Reference
(default)
=A1
Mixed
Reference
=$A1+A$2
Absolute
Reference
=$A$1+$A$2
Insert the dollar sign in front of the column letters if you are going to copy and paste your formula horizontally across columns.
$A5
Insert the dollar sign in front of the row numbers if you are going to copy and paste your formula vertically across row.
A$5