theteacher9999
New Member
- Joined
- Jun 8, 2020
- Messages
- 12
- Office Version
- 365
- 2010
- Platform
- Windows
Hi,
Here is part of my code:
What I get in the selected cell is: #NAME?
When I type the below all is fine but I don't want to enter a specific cell here becasue the intial ActiveCell may vary.
Do you know how to correct it?
Here is part of my code:
VBA Code:
mycell = ActiveCell.AddressLocal(False, False) 'it is O2
Cells(1, Range("A1").End(xlToRight).Column + 1).Offset(1, 0).Activate
Selection.Formula = "=IF(mycell=""Blue"",""yes"",""no"")"
What I get in the selected cell is: #NAME?
When I type the below all is fine but I don't want to enter a specific cell here becasue the intial ActiveCell may vary.
VBA Code:
Selection.Formula = "=IF(O2=""Blue"",""yes"",""no"")"
Do you know how to correct it?