using fill handle with hidden rows

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I use the fill handle to copy something down to a new row, the hidden
rows in between are also filled in. Is there any way I can stop this so that
it only copies to the rows that are showing? Thank you.
 
One way to copy a8 to visible in a9:a20

Sub CopyToVisibleCellsOnly()
For Each c In Range("a9:a20")
If c.Rows.Hidden = False Then Range("a8").Copy c
Next
End Sub
 
Thank you Don. Tbh it was more a setting I was looking for because I keep
accidentally overwriting the hidden rows. Thanks
 
Back
Top