VBAProIWish
Well-known Member
- Joined
- Jul 6, 2009
- Messages
- 1,027
- Office Version
- 365
- Platform
- Windows
Hello All,
I have been working on this one little problem for about 20 minutes and I give up. Would someone please tell me why this formula isn't working in a sub, but WILL work when inserted manually?
I run it and nothing appears in cell F2 or F3. But when I insert the same formula into F2 manually, it works! ARgggg.
Thanks much!
I have been working on this one little problem for about 20 minutes and I give up. Would someone please tell me why this formula isn't working in a sub, but WILL work when inserted manually?
Code:
Sub Test
Sheets("Numbers").Select
Range("F2").Select
ActiveCell.FormulaR1C1 = Right(E2, 2) & " " & Left(E2, 3)
Range("F3").Select
ActiveCell.FormulaR1C1 = Right(E3, 2) & " " & Left(E3, 3)
Range("F2:F3").Select
Selection.AutoFill Destination:=Range("F2:F" & Range("A" & Rows.Count).End(xlUp).Row)
End Sub
I run it and nothing appears in cell F2 or F3. But when I insert the same formula into F2 manually, it works! ARgggg.
Thanks much!
Last edited: