- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
- Sub Test()
- Dim CurrentLevel As Long, i As Long
- Dim bMark As Boolean, ar() As Long
-
- With Sheets(1).[G1].CurrentRegion
- ReDim ar(.Cells(1).Column - 1 To .Columns.Count)
- ar(LBound(ar)) = vbRed
-
- For i = 1 To .Rows.Count
- CurrentLevel = .Range(.Cells(i, "A"), .Cells(i, "E")).SpecialCells(xlCellTypeConstants).Column
- bMark = (.Cells(i, "F").Value = "*")
-
- .Cells(i, "G").Interior.Color = IIf(bMark, vbYellow, ar(CurrentLevel - 1))
- ar(CurrentLevel) = .Cells(i, "G").Interior.Color
- Next
- End With
- End Sub
½Æ»s¥N½X ¦^´_ 6# li_hsien |
|