Trying to count whether or not something is present within a grid in excel thats defined by whether or not it is filled with a color or not (thats how my boss wants it formatted). Not really an expert at VBA, and am getting an error in the second line of this loop. Variables are defined before this, and theres a bunch of other stuff inside the loop, but I'm not including that to save space. I'm pretty sure the problem would be evident here.
With ThisWorkbook.Worksheets("Core List")
Do While Not .Range(Cells(3, x)).Value = "" 'while current name box isn't empty
name1 = .Range(Cells(3, x)).Value 'sets the name in the stat sheet
ThisWorkbook.Worksheets(stat).Range(Cells(4, x - 2)) = name1
Loop
End With