Ride The Lightning
Board Regular
- Joined
- Jul 14, 2005
- Messages
- 238
Hi all
I want to change certain cell references in formula to absolute references. I already have the following code that changes all the cell references in a range to absolute references:
How would amend the code to only change certain cell references to absolute references? For example, change only "D3" in formula below to absolute:
=AUM7&AUM6&":"&AUM7&D3
will become:
=AUM7&AUM6&":"&AUM7&$D$3
Any help will be appreciated
I want to change certain cell references in formula to absolute references. I already have the following code that changes all the cell references in a range to absolute references:
Code:
For Each cell In Range("AUM14:AWT14")
If cell.HasFormula = True Then
cell.Formula = Application.ConvertFormula _
(Formula:=cell.Formula, _
fromReferenceStyle:=xlA1, _
toReferenceStyle:=xlA1, toAbsolute:=xlAbsolute)
End If
Next
How would amend the code to only change certain cell references to absolute references? For example, change only "D3" in formula below to absolute:
=AUM7&AUM6&":"&AUM7&D3
will become:
=AUM7&AUM6&":"&AUM7&$D$3
Any help will be appreciated