你的代码是隐藏行,但标题却要求隐藏列。以下是隐藏行,供参考i = WorksheetFunction.CountA([A1:A1000])Rows(i & ":1000").EntireRow.Hidden = True