row height

Hi,
I have been given an excel template.
This template gets populated with values in cells appropriately.
The task is that if a value is not present in a cell of a row then hide or delete that row. something like zero suppression.
I was thinking about setting the row height of that particular row to 0 in the load event.
If this is ok, then what is the code for this requirement please


Answer this question

row height

  • tamccann

    Solved it as follows:

    Dim i As Integer

    i = 27

    For Each c In Worksheets("Sheet1").Range("C27:C57").Cells
    If IsEmpty(c.Value) = True Then
    'Rows("43:43").RowHeight = 0
    Rows(i & ":" & i).RowHeight = 0
    End If

    i = i + 1
    Next


  • row height