J
jtdunn
Hi
I need some some with this macro formula. In excel, the formula is
displayed as text and I want it to be a number. There are numbers in the
iRow of M, F and N.
The problem is the scale factor, I think. I'm tried to change Scale Factor
to a number and it still doesn't work. Any suggestions?
Dim AlphaT As Long
Dim ScaleFactor As String
Dim AlphaForm As String
If (ws.Cells(iRow, 15).Value = ".1 Scale") Then ScaleFactor = "0.1"
If ((ws.Cells(iRow, 11).Value = "XYZ"))Then
AlphaT = Abs((ws.Cells(iRow, 13).Value * ws.Cells(iRow, 6).Value) +
(ws.Cells(iRow, 14).Value * ScaleFactor))
AlphaForm = "=ABS((M" & iRow & " * F" & iRow & ")+(N" & iRow & " *" &
ScaleFactor & "))"
End If
ws.Cells(iRow, 17).Value = AlphaT
ws.Cells(iRow, 17).Formula = AlphaForm
I need some some with this macro formula. In excel, the formula is
displayed as text and I want it to be a number. There are numbers in the
iRow of M, F and N.
The problem is the scale factor, I think. I'm tried to change Scale Factor
to a number and it still doesn't work. Any suggestions?
Dim AlphaT As Long
Dim ScaleFactor As String
Dim AlphaForm As String
If (ws.Cells(iRow, 15).Value = ".1 Scale") Then ScaleFactor = "0.1"
If ((ws.Cells(iRow, 11).Value = "XYZ"))Then
AlphaT = Abs((ws.Cells(iRow, 13).Value * ws.Cells(iRow, 6).Value) +
(ws.Cells(iRow, 14).Value * ScaleFactor))
AlphaForm = "=ABS((M" & iRow & " * F" & iRow & ")+(N" & iRow & " *" &
ScaleFactor & "))"
End If
ws.Cells(iRow, 17).Value = AlphaT
ws.Cells(iRow, 17).Formula = AlphaForm