请建议在 Excel 2003 中迭代 800 行以隐藏和取消隐藏行的解决方案。
For i = 0 To WSTreatmentOutComes.Range("F14:F813").Rows.Count - 1
If WSTreatmentOutComes.Range("F" & 14 + i).Value = "" Or WSTreatmentOutComes.Range("F" & 14 + i).Value = "0" Then
For j = 0 To 9
WSTreatmentOutComes.Range("F" & 14 + i + j).Rows.Hidden = True
Next j
Else
For k = 0 To 9
If WSTreatmentOutComes.Range("G" & 14 + i + k).Value = "" Or WSTreatmentOutComes.Range("G" & 14 + i + k).Value = "0" Then
WSTreatmentOutComes.Range("F" & 14 + i + k).Rows.Hidden = True
End If
Next k
End If
i = i + 9
Next i