Highlight multiple findings in Excel

R

Rick >.

Hi everyone,

I need to highlight multiple findings in excel for deletion, Is it possible?
Basically there are two format of data in one column and i need to find all
cells with font size 16 and delete it.

Many Thanks
 
G

Gord Dibben

Rick

Sub CellFont()
For Each cel In Selection
If cel.Font.Size = 16 Then
cel.Delete Shift:=xlUp
' cel.clearcontents
End If
Next
End Sub


Gord Dibben MS Excel MVP
 
R

Rick >.

Hi Gord,

Thank you for your quick reply.
I seleted a column and tried but only part of the size 16 cells are deleted.
In fact, what i want is to clear the content rather than deleting the cell,
is it possible?

thanks
 
R

Rick >.

Hi,

Got it! the code is wounderful~~ thank you!

Rick >.< said:
Hi Gord,

Thank you for your quick reply.
I seleted a column and tried but only part of the size 16 cells are deleted.
In fact, what i want is to clear the content rather than deleting the cell,
is it possible?

thanks
 
G

Gord Dibben

You found the commented out "cel.clearcontents" line I assume.

Thanks for the feedback


Gord

Hi,

Got it! the code is wounderful~~ thank you!

Gord Dibben MS Excel MVP
 
Top