Pressing F4 while editing a formula toggles between relative and absolute references for the selected cell reference.
Editing =A1*B1, if the cursor is on A1 and you press F4, it changes to $A$1.