If a cell in a worksheet is less than Q...

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

I'm looking for a macro to delete all values in a worksheet less than 10.
Can anybody help me with this?!?! THANKS!
 
Hi

This should do it.

Sub Test()
For Each c In Sheets("Sheet1").UsedRange
If c.Value < 10 Then c.ClearContents
Next
End Sub

Regards,

Per
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top