bmckenna
New Member
- Joined
- Oct 15, 2009
- Messages
- 33
Hey all,
This is my first post here, and hopefully the first of many more.
Anyways, I have about 40 or so cells that need their cell formula altered, so I pull in the formula, which works, modify it, which works, but when I try to output it to the sheet, no go. I tried dim as string/variant/double, but nothing. I keep getting the 1004 Application-Defined or Object-Defined error. Here's the code:
Sub EditFormula()
Dim x As String
For i = 7 To 49
With ThisWorkbook.Sheets("INTERFACE2")
x = .Cells(i, 2).Formula
.Cells(i, 3) = "=iferror(" + CStr(x) + ", rr)"
End With
Next i
End Sub
Thanks!
This is my first post here, and hopefully the first of many more.
Anyways, I have about 40 or so cells that need their cell formula altered, so I pull in the formula, which works, modify it, which works, but when I try to output it to the sheet, no go. I tried dim as string/variant/double, but nothing. I keep getting the 1004 Application-Defined or Object-Defined error. Here's the code:
Sub EditFormula()
Dim x As String
For i = 7 To 49
With ThisWorkbook.Sheets("INTERFACE2")
x = .Cells(i, 2).Formula
.Cells(i, 3) = "=iferror(" + CStr(x) + ", rr)"
End With
Next i
End Sub
Thanks!