excel - Hide rows based on multiple cells -
I need to hide rows in Excel based on the value of several cells in the same line. If all in my line 0 If it is empty or empty, then I need it. If there is no integer (0 or negative) I need a row shown on the same sheet I have 'section headers' which are separate sections, and below it, a row of spaces Can I leave those information? I had some partially written working lines, I could not get it together.
Hope for any help Thanks and thanks!
Edit: Now if I have a hidden column then I ignore the 'sum' hidden column I have tried to hunt some nests in the answer to Rowan, but no one.
Hide myRow for each The range to hide for each room. If cell cell Columns Vested = false then total = total + cell.value end if next if total = 0 then 'if is the sum of the line = 0, hide myRow.EntireRow.Hidden = True End next
My quick trend is on:
sub row header 1 () range as hide hide range To hide the myRow range set, range = sheets (2) range ("A2: D12") 'to hide it, you have to set it to apply to the range (if you want to select active selection Can use Applications) hideRange.Rows.EntireRow.Hidden = False 'currently hidden to show a row HideRange.Rows if the application for each myRow. Worksheet function. Sum (myRow) = 0 then 'Hide the value of' row = 0 'to myRow Take this step one step ahead, and if any column is hidden then do not include yoga in it, going away from the worksheet function Yoga: sub-row header () dim the range as the dim-hide range Range Dimension Range as Range range Hide double set in the form of slow Bob range = Sheets (2). Range ("A1: G12") 'You should set this to apply to your desired range (if you wish you can use active selection) hideRange.Rows.EntireRow.Hidden = False' currently hidden Hide rows, in each row in the hidden range. Rob Bob = 0 myRow.Cells (for each cell) if the cell. Antire column Hidden & lt; & Gt; Really debug Print cell Address & amp; "" & Amp; Cell.Value bob = bob + cell.Value end If next if Bob = 0 then 'if' is the sum of line = 0 then hide myRow. Enterro.Hedit = True and If Next End Sub
Comments
Post a Comment