tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,210
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi Everyone,
I have this macro that works great but it copys cells with values even if the row is hidden,
is it possible to copy only cells that are visiable?
If not, or if its easier a macro that clear contents of all hidden rows would be fine
Thanks
Tony
I have this macro that works great but it copys cells with values even if the row is hidden,
is it possible to copy only cells that are visiable?
If not, or if its easier a macro that clear contents of all hidden rows would be fine
Thanks
Tony
Code:
Sub Move_Values1()
Application.ScreenUpdating = False
Sheets("Test1").Select
LastRow1 = Sheets("Test1").Cells(Rows.Count, "A").End(xlUp).Row
If LastRow1 < 10 Then
Exit Sub
End If
Sheets("Test1").Range("J10", "SW" & LastRow1).SpecialCells(xlCellTypeConstants, 23).Select
For Each Area In Selection.Areas
AddS = Area.Address
Sheets("Test2").Range(AddS).Value = Area.Value
Next Area
End Sub