• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Dynamic formating of a table

koskesh

Member
Hi all,

I have a dashboard with a dynamic table.
Sometimes the table has 4 rows, sometimes its >20.
I want the formating to change if the number of rows is less then the maximum displayed (of 9)

See file below.

Thanks!
 

Attachments

Hi Somendra,

just found a way to do what I want with VBA:

Option Explicit

Sub BlendeA()
Dim r As Range
Dim w As Range
Dim rBlend As Range
Set rBlend = Range("C11:C19")

Application.ScreenUpdating = False
rBlend.EntireRow.Hidden = False
For Each r In rBlend
If Len(r) = 1 Then
If w Is Nothing Then
Set w = r
Else
Set w = Union(w, r)
End If
End If
Next r
If Not w Is Nothing Then w.EntireRow.Hidden = True
Application.ScreenUpdating = True

End Sub
 
Back
Top