View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim May Jim May is offline
external usenet poster
 
Posts: 477
Default Delete row data and cell colour

Without using the Lcase() twice below in the code presented
"Sick" is not "sick"
"SICK" is not "Sink"
etc...
So I'd use:

Sub tester()
If LCase(Range("A1").Value) = LCase("sick") Then
Range("B1:G1").ClearContents
End If
End Sub




" wrote:

Sure...


If Range("A1").Value = "sick" Then
Range("B1:G1").ClearContents
End If



alex1982 wrote:
Is it possible to write a macro for say if cell A1 is equal to say word
such as sick, then the cells b1-g1 would have all data removed?


--
alex1982
------------------------------------------------------------------------
alex1982's Profile: http://www.excelforum.com/member.php...o&userid=37494
View this thread: http://www.excelforum.com/showthread...hreadid=573248