This code will take a selected group of cells and add an = symbol to the
beginning of them. Only tested with cells containing numbers/empty cells.
Probably create incredible errors if you use it with cells containing text.
Open the workbook, press [Alt]+[F11] to open the VB Editor. In the VBE,
choose Insert --> Module and copy and paste the code below into the new
module. Close the VB Editor. Select the cells you need to add the= symbol
to and then use Tools --> Macro --> Macros to run the code. I'll leave it to
you to add the "+L..." since I assume that the row number is probably going
to change. But if it was always to be "+L62" then you could change the one
line below to:
anyCell.Formula = "=" & anyCell.Value & "+L62"
Sub MakeItAFormula()
'select the cells you want to change
'and then call this routine from
' Tools --> Macro --> Macros
Dim anyCell As Range
For Each anyCell In Selection
If Not IsEmpty(anyCell) And _
Not anyCell.HasFormula Then
anyCell.Formula = "=" & anyCell.Value
End If
Next
End Sub
Dewayne said:
I have a large table with numbers only in it i.e. 1234.5
I need to make these numbers part of a formula now by adding an equal sign
to each number in the table i.e. =1234.5+L62.
Is there a way to have Excel add the = sign to the cells without having to
go into each cell and manually add it?
Thanks for any suggestions.