View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jeff Jeff is offline
external usenet poster
 
Posts: 921
Default If text found in Row, delete Column

Perfect... thank you

"RB Smissaert" wrote:

Try this:

Sub test()

Dim c As Long

For c = 256 To 1 Step -1
If Cells(10, c) = "Adjust" Then
Columns(c).Delete
End If
Next

End Sub


RBS

"JEFF" wrote in message
...
Thanks for the response.. a bit of a novice and couldn't get it to work:

** The text I'm looking for ("Adjust") will always be in row 10.....


"RB Smissaert" wrote:

Sub test()

Dim c As Long

'looking for values in row 4, starting in column 30

For c = 30 To 1 Step -1
If Cells(4, c) = 1 Then
Columns(c).Delete
End If
Next

End Sub


RBS


"JEFF" wrote in message
...
Hello,

I'd like to be able to search a row for some text and, if found, delete
that
column...

Appreciate any help.