Remove the $ from a cell reference

L

Les

Hi,

could anybody help with this please ?

I need the cell reference to read A25 and not $A$25

Any help much appreciated
 
M

Mike H

Les,

If it's only a single cell then why not just re-type as A25 or select it and
tap F4 a few times until the reference becomes relative.

Mike
 
M

Mike H

Hi,

Right click your sheet tab, view code and paste this in. Select the formula
to convert and run the code.

Sub sonic()
Dim c As Range
For Each c In Selection
If c.HasFormula Then
c.Formula = Application.ConvertFormula _
(c.Formula, xlA1, xlA1, xlRelative)
End If
Next
End Sub

Mike
 
G

Gary Keramidas

les, try one of these and see if it's what you want.

Sub test()
MsgBox ActiveCell.Address
MsgBox ActiveCell.Address(0, 0)
MsgBox ActiveCell.Address(0)
MsgBox ActiveCell.Address(, 0)
End Sub
 
C

Charlotte E.

This should do the trick:

Dim CellVariabel As String
CellVariabel = "$A$25" ' Or what ever

CellVariabel = Replace(CellVariabel,"$","")

Hope you get the idea :)
 
Top