Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Skip hidden lines?
Hi,
Thanks to some super helpful people in this community, I've been able to do some pretty cool stuff. However, now I've had to modify the spreadsheet such that it has some hidden rows in the midst of where this script places it's values. Is there a way that it can "skip" hidden rows? (For instance, if rows 8 and 9 are hidden, that it skips them, and copies values subsequent to 7 into the next visible row - 10.) Thanks in advance, Ben Private Sub SuperSum() TargetCell = "U6" ' First cell to start coping the selected numbers to Range(TargetCell, Range(TargetCell).End(xlDown)).ClearContents For Each cell In Selection Range(TargetCell).Offset(off, 0) = cell.Value ' Can hidden rows be excluded? MyResult = MyResult + cell.Value off = off + 1 Next Range("U1").Select ' Keep from overwriting the other fields Range(TargetCell).Offset(off, 0) = MyResult Selection = Range(TargetCell).Offset(off, 0) Application.GoTo Reference:="R65536C21" ' The range of cells examined for selections Selection.End(xlUp).Select Selection.Font.Bold = True With Selection.Font .Name = "Arial" .Size = 10 End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .ColorIndex = 0 .Weight = xlThick End With Range("U1").Select Selection.Clear Range("U200").Select Selection.End(xlUp).Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Skip hidden rows while copying down in excel? | Excel Discussion (Misc queries) | |||
How do I copy information and skip hidden cells? | Excel Discussion (Misc queries) | |||
skip hidden sheets | Excel Programming | |||
How do I copy cells and skip lines? | Excel Discussion (Misc queries) | |||
Excel skip some lines of VBA code | Excel Programming |