Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
return text value found most frequently in a column globetrotter Excel Worksheet Functions 8 February 8th 09 01:15 PM
How to delete row if column is blank or certain text Steve D. Excel Programming 5 January 6th 06 03:20 PM
To Delete the specific rows when blank is found on column A ddiicc Excel Programming 3 August 5th 05 05:32 AM
Delete Rows when Blanks are found in Column A:A ddiicc Excel Programming 4 August 4th 05 10:46 AM
Search column - return row found in long text string JayL Excel Programming 1 March 5th 05 03:23 AM


All times are GMT +1. The time now is 11:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"