![]() |
delete uncolour row
Please help me!!
how to delete row where the row is not coloured |
delete uncolour row
On Nov 7, 2:18 pm, wrote:
Please help me!! how to delete row where the row is not coloured Hi Isybel It depends on how and when you want to delete them. Do you want to this procedure once, or more often? I'd say write a function which goes through all rows, look up the interior.color value and delete those who are = xlnone If you need help doing that, just ask. hth Carlo |
delete uncolour row
I think this will give you what you want:
Sub DeleteAllUncolored() Dim ClrRng As Range Set ClrRng = Range("A1", Range("A5000").End(xlUp)) For Each cell In ClrRng If cell.Interior.ColorIndex = xlNone Then cell.EntireRow.Delete End If Next cell End Sub As always, be extremely careful when deleting date; try this macro on a sample before you execute on your actual data. Regards, Ryan-- -- RyGuy "carlo" wrote: On Nov 7, 2:18 pm, wrote: Please help me!! how to delete row where the row is not coloured Hi Isybel It depends on how and when you want to delete them. Do you want to this procedure once, or more often? I'd say write a function which goes through all rows, look up the interior.color value and delete those who are = xlnone If you need help doing that, just ask. hth Carlo |
All times are GMT +1. The time now is 10:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com