Hiding Rows with Zero or Blank Values

R

Robin

I emailed you a sample worksheet to run.
I don't have professional training, but this works.

Sub Hide_Rows_With_Zero_Value()
Dim MyDebitValue

Range("A2").Select 'start at the top of the list
'each loop thru the Debit Value changes...
Do
MyDebitValue = ActiveCell.Offset(0, 6).Value 'column G

If MyDebitValue = "" Then 'if it is zero
Selection.EntireRow.Hidden = True
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.Offset(1, 0).Select 'move to the next
row
End If

Loop Until ActiveCell.Value = "" 'loop until the value in
column A is empty
End Sub

Give it a try & good luck,
Robin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top