Assume you have the following dataset. It contains sales from two different stores and their total.
The FORMULATEXT function shows that the Total column contains formulas with the SUM function.
Method 1 – Insert a Dollar Sign ($) in Excel Formula with a Keyboard Shortcut
Steps
- Put the cursor before a cell reference in the formula or select that cell reference in the formula bar.
- Alternatively, you can double-click on the cell containing the formula to insert the dollar sign there.
- Press F4 on your keyboard.
- This will insert the dollar sign in the formula, making the cell reference an absolute reference.
- Press F4, and the reference changes to a mixed reference making the row fixed but keeping the column relative.
- Press F4 again to make the column fix but the row becomes relative.
- Pressing F4 again returns the reference to a relative reference.
- You can select multiple references and press the F4 key to change them.
Read More: How to Insert Rupee Symbol in Excel
Method 2 – Use the Find and Replace Tool
Steps
- The formula text shows no dollar signs in the formulas.
- Press Ctrl + H to open the Find and Replace window.
- In Find what, put (B.
- In Replace with, insert ($B$.
- Press Replace All as shown in the picture below.
- You will see the confirmation if it was done properly.
- Here’s how the formula text changes.
- Repeat to find :C and replace with :$C$ as shown below.
- More dollar signs will be added to the remaining part of the formulas.
Read More: How to Insert Sign in Excel Formula
Method 3 – Use VBA Code to Insert Dollar Signs ($) in Formula
Steps
- Press Alt + F11 to open the VBA window.
- Select Insert and choose Module from the window ribbon.
- Copy and paste the following code into the Module.
Sub InsertDollarSignsInExcelFormulas()
Dim FormulaCell As Range
For Each FormulaCell In ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas)
FormulaCell.Formula = Application.ConvertFormula(FormulaCell.Formula, xlA1, xlA1, True)
Next
End Sub
- Press F5 to run the code.
Things to Remember
- If your computer has the Fn key, you may need to press Fn + F4 for the shortcut.
- The VBA code changes the cell references to absolute references only by inserting the dollar sign.
Download the Practice Workbook
Related Articles
- How to Write X Bar in Excel
- How to Insert Tick Mark in Excel
- How to Put Equal Sign in Excel without Formula
- How to Insert Symbol in Excel Footer
- How to Put Sign in Excel Without Formula
<< Go Back to Insert Symbol in Excel | Excel Symbols | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!
Thanks for the examples. I had totally forgot about the F4.. lol. Thanks
Hello AJ,
You are most welcome.
Regards
ExcelDemy