ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If a cell in a worksheet is less than Q... (https://www.excelbanter.com/excel-programming/405395-if-cell-worksheet-less-than-q.html)

Aaron

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

Per Jessen

If a cell in a worksheet is less than Q...
 
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

"Aaron" skrev i en meddelelse
...
I'm looking for a macro to delete all values in a worksheet less than 10.
Can anybody help me with this?!?! THANKS!





All times are GMT +1. The time now is 08:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com