I'm trying to run an If statement that can only run if the worksheet exists.
Any help would be much appreciated.
Below is my code:
![]()
If Worksheets(SheetName).Name = "October" Then Sheets("Gene").Select Range("C4").Select ActiveCell.FormulaR1C1 = "=SUMPRODUCT(--(July!R2C4:R20000C4=""IFC-00546492-TF055451""),--(July!R2C2:R20000C2=""Staff Cost""),July!R2C5:R20000C5)" Else If... . . . End If
Bookmarks