Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
delete contents of visible cells only
Hi All,
I would like to loop thru a range of cells and delete the contents of the visible cells only. eg if the range is A1:D10 and column B is hidden all the cells will be deleted except B1:B10 I tried the following but the code fails where indicated. Sub testdelete() Dim rng As Range Dim mycell Set rng = Sheet1.Range("A1:D10") For Each mycell In rng If mycell.Hidden = False Then fails here mycell.Delete End If Next mycell End Sub Can anybody help please? Regards Michael Beckinsale |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I only delete/clear the visible cells in a filtered list? | Excel Worksheet Functions | |||
Delete contents of cells | Excel Worksheet Functions | |||
Delete Contents of Cells | Excel Programming | |||
contents in cells are not visible when word wrap is selected | Excel Discussion (Misc queries) | |||
Delete specific cells contents in a row with some locked cells in the same row | Excel Programming |