As SJR suggested, I missed ws
before the Range
s. So I had to change this bit:
If Range("C" & cell.Row) = "" Or IsEmpty(Range("C" & cell.Row)) Then
to this on line 8 of the function:
If ws.Range("C" & cell.Row) = "" Or IsEmpty(ws.Range("C" & cell.Row)) Then
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…