2 ways...if you want to use a formula
put a value in col C for pass, and col D for FAIL, using =IF(B2="PASS",1,"")
then sum the columns
or
else VBA code:
![]()
range("a1").select While ActiveCell.Value <> "" select case ActiveCell.value case "PASS" iPass = iPass + 1 case "FAIL" iFail = iFail + 1 end select ActiveCell.Offset(1, 0).Select 'next row Wend msgbox ipass & " passed" msgbox iFail & " failed"
Bookmarks