W
wolfpack95
I have a VB macro variable that I want to reference in an Excel formul
(faulty code below gives me a #NAME? error) . There has to be an eas
way to do this but I haven't found it yet. Thanks in advance.
Sub test()
'
'
Dim ok As String
Dim no As String
String1 = "ok"
String2 = "no"
Range("A1").Select
ActiveCell.FormulaR1C1 = "23"
Range("B1").Select
ActiveCell.FormulaR1C1 = "45"
Range("A2").Select
ActiveCell.FormulaR1C1 = "=IF(R[-1]C>20, String1, String2)"
End Su
(faulty code below gives me a #NAME? error) . There has to be an eas
way to do this but I haven't found it yet. Thanks in advance.
Sub test()
'
'
Dim ok As String
Dim no As String
String1 = "ok"
String2 = "no"
Range("A1").Select
ActiveCell.FormulaR1C1 = "23"
Range("B1").Select
ActiveCell.FormulaR1C1 = "45"
Range("A2").Select
ActiveCell.FormulaR1C1 = "=IF(R[-1]C>20, String1, String2)"
End Su