Hiding Rows with Zero or Blank Values
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 -----Original Message----- Each Month I need to fill in a Standard journal entry (Columns A-H with Column F (Debits-$$) & G (Credits-$$)). There is 17 rows of header information and beginning on row 18 I begin the regular detail account text and Dr/Cr update. Some months my line # say 20, 25-28, 35 and 38-45 may have $0.00 dollar amounts. I wish to leave the lines intact on the worksheet, but hide all rows that have either the 0.00 in either the Debit or Credit column or are Blank (both in Column F & G). Could someone help me with the code that I can assign to a button (I can do that) where I can have (the Macro) it collapse such 0.00 rows and give me only positive rows??.. TIA,, . |
All times are GMT +1. The time now is 02:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com