View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sheeloo[_3_] Sheeloo[_3_] is offline
external usenet poster
 
Posts: 1,805
Default Macro clear cells if meet 1 condition

Try
'This will work on the current sheet...
Sub clear()
Range("A4:A2000").Select
For Each CurCell In Selection
If CurCell.Value < 140 Then CurCell.ClearContents
Next CurCell
End Sub
--
Always provide your feedback so that others know whether the solution worked
or problem still persists ...


"Sojo" wrote:

Hello out the

I have a worksheet (sheet 1) I need to write a macro that will look at
A4:A2500, clear contents of all cells that have a value <140, then look at
column C4:C2500 and clear contents of all cells that have a value 30. I
have more conditions, but can modify the code to meet the requirements.

Would appreciate any assistance on this.