tadung2710
Thành viên mới

- Tham gia
- 2/3/25
- Bài viết
- 1
- Được thích
- 0
Option Explicit
Function demcot(cot As Range) As Integer
Dim ce As Range, c&
For Each ce In cot
If ce.MergeCells Then
c = c + 1
End If
Next
demcot = c
End Function
'-----------------------------------------------------------------------------
Function demvung(vung As Range, dieukien As String) As Integer
Dim ce As Range, c&, st As String
For Each ce In vung
If ce.MergeArea.Cells(1, 1) = dieukien Then
c = c + 1
Debug.Print ce.Address
End If
Next
demvung = c
End Function