Created
March 20, 2018 08:57
-
-
Save DuongAQ/20500c361fba0227a4435c79f87def2e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Phan_Mang_Data() | |
Dim lr As Long 'Biến dòng cuối | |
Dim area As Range 'Biến mảng chi tiết | |
Dim sh As Worksheet 'Biến Sheet | |
Set sh = ActiveSheet 'Tại sheet đang sử dụng | |
'Tô màu xanh cho các mảng trong cột A | |
lr = sh.Cells(Rows.Count, 1).End(xlUp).Row 'Xác định dòng cuối cột A | |
For Each area In sh.Range("A2:A" & lr).SpecialCells(xlCellTypeConstants).Areas | |
area.Interior.Color = vbGreen 'Tô màu xanh | |
Next area | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment