I want to insert an if statement in diffent sheets in excel. I therefore wrote the following:
Sub Final_Insert_Columns()
Dim month As Variant
Dim months As Variant
months = Array("07 AMSTERDAM", "07 ARNHEM")
For Each month In months
Sheets(month).Activate
Range=("n4").Formula = "IF(OR(T4=0;T4="PAS");"X"; (AJ4/AK4))
Next
End sub
There seems to be a problem however with this part:
Range=("n4").Formula = "IF(OR(T4=0;T4="PAS");"X"; (AJ4/AK4))
Compile error: expected end of statement.
Any thoughts on how I should get this working?