It should be a comma between rowcount and colcount1 in Cells.
![]()
With Worksheets("Sheet1") If .Cells(rowcount, colcount1) = "AAA" Or .Cells(rowcount, colcount1) = "BBB" Then cprid = .Cells(rowcount, colcount2) & "__1111" .Cells(rowcount, colcount1 + 40) = cprid End If End With
Bookmarks