What you are looking for is changing relative cell references to absolute cell refrences. This is done by placing a dollar symbol in front of either the column letter or the row number or both.
You can do this manually or selecting the range in the formula and hit F4. Hitting it multiple times cycles through the different options (row, column or both and then back to none)
When you apply this knowledge to your formula it will look like this:
Since you are dragging your formula down, there is no need to place dollar signs in front of the column letter.