Option Explicit
Const MyColor As Byte = 30
Sub UsedRange()
Dim Rng As Range, Cls As Range, cRng As Range
Set Rng = Worksheets("S1").UsedRange
For Each Cls In Rng
If Cls.Interior.ColorIndex > MyColor Then
If cRng Is Nothing Then
Set cRng = Cls
Else
Set cRng = Union(cRng, Cls)
End If
End If
Next Cls
If Not cRng Is Nothing Then MsgBox cRng.Address
End Sub
DIỄN ĐÀN GIẢI PHÁP EXCEL Group 1
DIỄN ĐÀN GIẢI PHÁP EXCEL Group 2