您这里写错了,if cells(2,5).value = ""帆首昌态扒芹拍 thenrows(2).entirerow.hidden = trueelse:rows(2).entirerow.hidden = falseend if
for i= 2 to 5rows(i).entirerow.hidden = cells(i,5).value = "" next