Hi everyone,
I have data in over 200 000 rows, accross a couple columns (A:I). Some cells are filled in, some are blank - but all have certain formatting.
Now, I want to clear the formatting from blank cells only, starting from second row.
I need to do it the fastest way possible, but cannot sort the data. So I wrote this code:
Unfortunately, the code doesn't work as expected - it removes formatting from ALL cells, instead of blank cells only. And it takes over 2 minutes to complete that (way too long!)
Can you help me out with that? What would be the best (fastest!) way to do that correctly?
Thank you very much in advance.
I have data in over 200 000 rows, accross a couple columns (A:I). Some cells are filled in, some are blank - but all have certain formatting.
Now, I want to clear the formatting from blank cells only, starting from second row.
I need to do it the fastest way possible, but cannot sort the data. So I wrote this code:
Code:
Sub test()
ActiveSheet.Range("A2:I" & ActiveSheet.UsedRange.Rows.Count).SpecialCells(xlCellTypeBlanks).ClearFormats
End Sub
Unfortunately, the code doesn't work as expected - it removes formatting from ALL cells, instead of blank cells only. And it takes over 2 minutes to complete that (way too long!)
Can you help me out with that? What would be the best (fastest!) way to do that correctly?
Thank you very much in advance.