|
发表于 2012-5-24 12:56
|
显示全部楼层
本楼为最佳答案
- Sub test()
- Dim ar, s
- Dim i As Integer, j As Integer
- s = Range("a9")
- ar = Range("d11").CurrentRegion
- For j = 1 To UBound(ar, 2)
- For i = 1 To UBound(ar)
- If ar(i, j) - s = 0 Then
- Cells(2, j + 3).NumberFormatLocal = "@"
- Cells(2, j + 3) = ar(i, j)
- Exit For
- End If
- Next
- Next
- End Sub
复制代码 |
|