【发布时间】:2013-12-05 03:33:47
【问题描述】:
类似于如果您在电子表格中向下拖动一个单元格,它将继续引用该公式同一行中的单元格。我需要找到一种方法,可以在电子表格的 I 列中搜索字母 Y,如果它在 I 列中找到 Y,它将选择同一行中 B 到 AR 列的单元格。然后只隐藏那些单元格而不是整行。这是我目前所拥有的:
Sub Macro1()
'Sub HideRows()
Dim cell As Range
For Each cell In Range("I1:I5000")
If UCase(cell.Value) = "Y" Then
Select (??? this is where I need to find help selecting the proper range.)
Selection.NumberFormat = ";;;"
End If
Next
Calculate
End Sub
谢谢,
【问题讨论】: