tonyBruckner
New Member
- Joined
- Apr 18, 2002
- Messages
- 21
I'm trying to write a simple formula into cell A2 to get the value 3 to appear in it...
if cell A1 = 3
Sub writeFormula
Dim cellValue as string
range("A1").select
cellValue = activeCell.address
range("A2").select
activeCell.FormulaR1C1 = "=" & cellValue
End Sub
The hover looks right but I get an alert that disqualifies the last line. I've tried several variations...
What is the correct syntax?
if cell A1 = 3
Sub writeFormula
Dim cellValue as string
range("A1").select
cellValue = activeCell.address
range("A2").select
activeCell.FormulaR1C1 = "=" & cellValue
End Sub
The hover looks right but I get an alert that disqualifies the last line. I've tried several variations...
What is the correct syntax?