কিভাবে রং ব্যবহার করে Count করবেন | অনেক সময় আমরা যে হাই-লাইট করি ওটা গননা করতে চাই তখন এই ভাবে কাজ করলে সেটা দিয়ে গননা করা সম্ভব ।
Video- Link- https://youtu.be/toLMbOvE7zY?si=CkYmke6BaUHJB6iL
Excel File --- https://drive.google.com/file/d/1ndkdHOqnOPjMTJywvR8go75wgOhe9uiY/view?usp=sharing
Function CountColoredCells(rng As Range, color As Range) As Long
Dim cell As Range
Dim count As Long
Application.Volatile
count = 0
For Each cell In rng
If cell.Interior.color = color.Interior.color Then
count = count + 1
End If
Next cell
CountColoredCells = count
End Function