L
lostinformulas
This Code works part of the time see examples below:
Sub Absolute()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula(cell.Formula, _
xlA1, xlA1, xlAbsolute)
End If
Next
End Sub
Sub AbsoluteRow()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula(cell.Formula, _
xlA1, xlA1, xlAbsRowRelColumn)
End If
Next
End Sub
Sub AbsoluteCol()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula(cell.Formula, _
xlA1, xlA1, xlRelRowAbsColumn)
End If
Next
End Sub
Sub Relative()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula(cell.Formula, _
xlA1, xlA1, xlRelative)
End If
Next
End Sub
I was able to run the Macro it works in some of the cells howeve
others received and error message of #VALUE.
The difference between the formulas that work and the one that didn't
The code worked in the cells that had the following formula:
=IF(AND('1'!$AP64="yes",'1'!$A64="yes"),1,"")
The cells that didn't work had the following formula:
=IF(AND('1'!$B64="yes",'1'!$AO64="yes",'1'!$AQ64=
HB",'1'!$D64="yes"),0.5,IF(AND('1'!$B64="yes",'1'
$AO64="yes",'1'!$AQ64="HB"),1,""))
Could it have something to do with the second If statement in th
formula???
Sub Absolute()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula(cell.Formula, _
xlA1, xlA1, xlAbsolute)
End If
Next
End Sub
Sub AbsoluteRow()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula(cell.Formula, _
xlA1, xlA1, xlAbsRowRelColumn)
End If
Next
End Sub
Sub AbsoluteCol()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula(cell.Formula, _
xlA1, xlA1, xlRelRowAbsColumn)
End If
Next
End Sub
Sub Relative()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula(cell.Formula, _
xlA1, xlA1, xlRelative)
End If
Next
End Sub
I was able to run the Macro it works in some of the cells howeve
others received and error message of #VALUE.
The difference between the formulas that work and the one that didn't
The code worked in the cells that had the following formula:
=IF(AND('1'!$AP64="yes",'1'!$A64="yes"),1,"")
The cells that didn't work had the following formula:
=IF(AND('1'!$B64="yes",'1'!$AO64="yes",'1'!$AQ64=
HB",'1'!$D64="yes"),0.5,IF(AND('1'!$B64="yes",'1'
$AO64="yes",'1'!$AQ64="HB"),1,""))
Could it have something to do with the second If statement in th
formula???