LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to delete selected columns?

Here's my example:
2006 2006 2005 2005 2004 2004
Name you(me) you you(me) you you(me) you

I want to delete the columns that the names are "you(me)"
I write the code as follows:

for i=1 to 6
if cells(2,i)="*me*" then
columns.select
selections.delect
i=i-1
end if
next i


but nothing changed when I run the code
what's wrong with that?
is it proper for me to use cells(2,i)="*me*" to find anything that has the
string"me"?
thank you!
 
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
Multiple cells or columns are selected instead of selected cell or Mikey Excel Discussion (Misc queries) 1 April 29th 09 09:48 PM
Delete selected sheet cyzax7 via OfficeKB.com Excel Programming 1 June 13th 06 02:11 AM
delete every nth row in selected range cwinters Excel Discussion (Misc queries) 1 July 6th 05 08:17 PM
delete columns and rows-cells equalling zero or any selected value Scottie Excel Worksheet Functions 2 May 9th 05 08:47 PM
Delete Selected Rows Ken[_18_] Excel Programming 2 February 5th 04 10:33 PM


All times are GMT +1. The time now is 12:35 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"