Automatically add $ symbols to formula?

thx1139

New member
Power User
Local time
7:16 PM
Messages
110
I've typed a long formula into a cell in Excel 2010 and realised that all the cell references should have $ symbols in front so I can copy and paste it to different cells without references changing. Is there a quick way to achieve this after having typed in the formula or do I need to do it manually?
 

My Computer My Computer

OS
Win 7 Home Premium (OEM) - Install date: 02-2010
CPU
AMD X4 Phenom II 965
Motherboard
Gigabyte GA 790FXTA-UD5
Memory
OCZ Black Edition - 2x2GB DDR3-1600
Graphics Card(s)
Sapphire HD 5770 1GB GDDR5
Sound Card
Integrated
Monitor(s) Displays
Generic CRT
Screen Resolution
1024x7xx
Hard Drives
System: OCZ Vertex 2, 60 GB SSD
Data: Western Digital Caviar Black WD1002FAEX, 1TB HDD
PSU
Thermaltake w705 - 700 watt
Case
Fractal R2 Define
Cooling
Air
Keyboard
Generic
Mouse
Gigabyte Optical Gaming Mouse
Internet Speed
IDSL
Try this.

In another column (like column B for example), you can enter the following formula where "$" would be combined with the contents cell "A" with a leading "dollar sign". You can then paste this formula down in column B to create this special field based on column A

="$"&A1
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Bulid/Self made
OS
Windows 11 x64
CPU
i5 2500K @ 3.3 GHz
Motherboard
ASUS P8 Z77 V pro
Memory
16 GB DDR 3 @ 1600Mhz
Graphics Card(s)
MSI 1050TI 4GB OC version
Sound Card
On Board (Realtek HD audio)
Monitor(s) Displays
Samsung 22" LCD
Screen Resolution
1920*1080
Hard Drives
Seagate 1 TB, WD 1TB, Seagate 2 TB ( I use a lot of space)
PSU
coolermaster 750 W
Case
Coolermaster HAF912
Cooling
Coolermaster hyper 212 EVO
Keyboard
Samsung
Mouse
Dell Wireless
Internet Speed
Wireless 50 Mbps
Antivirus
AVG 2016 Internet Security
Browser
Google Chrome
That would work fine if the only reference that needed a $ to lock the reference were the first one. If it is a long formula, there really is no easy way to do it automatically, unless the cell references are the same (in which case you could do a find and replace, looking in formulas).

However, if the cell references are all different you're going to have to do it manually. The good news is that you should only have to do it once per range, because you can, as you noted, just copy the formulas across and down.

Here's an example of a formula I have in one of my spreadsheets... In a case like this, I actually did forget the $ and had to manually add it where required..

Code:
=COUNTIFS('Analysis Data'!$R$5:$R$1840,MONTH($C8),'Analysis Data'!$S$5:$S$1840,$B8,Games!$F$5:$F$1840,"O",Games!$I$5:$I$1840,Q$3)
+COUNTIFS('Analysis Data'!$R$5:$R$1840,MONTH($C8),'Analysis Data'!$S$5:$S$1840,$B8,Games!$F$5:$F$1840,"O",Games!$M$5:$M$1840,Q$3)
+COUNTIFS('Analysis Data'!$R$5:$R$1840,MONTH($C8),'Analysis Data'!$S$5:$S$1840,$B8,Games!$F$5:$F$1840,"O",Games!$Q$5:$Q$1840,Q$3)
+COUNTIFS('Analysis Data'!$R$5:$R$1840,MONTH($C8),'Analysis Data'!$S$5:$S$1840,$B8,Games!$F$5:$F$1840,"O",Games!$U$5:$U$1840,Q$3)
+COUNTIFS('Analysis Data'!$R$5:$R$1840,MONTH($C8),'Analysis Data'!$S$5:$S$1840,$B8,Games!$F$5:$F$1840,"O",Games!$Y$5:$Y$1840,Q$3)
+COUNTIFS('Analysis Data'!$R$5:$R$1840,MONTH($C8),'Analysis Data'!$S$5:$S$1840,$B8,Games!$F$5:$F$1840,"O",Games!$AC$5:$AC$1840,Q$3)
EDIT: Actually, the ="$"&A1 wouldn't work.. You'd end up with $=<cell_value>.. It'd have to be ="=$"&A1
 
Last edited:

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home Made
OS
Linux Mint 17 Cinnamon | Win 7 Ult x64
CPU
Intel I7-3770K @ 4.2ghz
Motherboard
ASRock Extreme 4
Memory
32GB G-Skill C10Q
Graphics Card(s)
EVGA GTX 670 2GB SC
Sound Card
Creative Fatality ExtremeGamer
Monitor(s) Displays
LG E2742V x 2
Screen Resolution
1920x1080
Hard Drives
256GB Vertex 4 SSD
2TB Seagate ST2000DM001
1TB Seagate ST1000DM003
PSU
Corsair HX 650
Case
HAF 932 advanced
Cooling
Corsair H100i liquid cooler
Keyboard
Logitech Wireless
Mouse
Logitech Wireless
Internet Speed
OptusNet NBN 100/40
Antivirus
Malwarebytes
Browser
Firefox 30
Other Info
Router: Sagemcom F@st 3846 Crippled by Optus.
Back
Top