PC Review


Reply
Thread Tools Rate Thread

How to delete selected columns?

 
 
=?Utf-8?B?Sm9obiBMdW8=?=
Guest
Posts: n/a
 
      16th Jun 2007
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!
 
Reply With Quote
 
 
 
 
NOPIK
Guest
Posts: n/a
 
      16th Jun 2007
On Jun 16, 9:51 am, John Luo <John L...@discussions.microsoft.com>
wrote:
> 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

Columns(i).Delete


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple cells or columns are selected instead of selected cell or Mikey Microsoft Excel Misc 1 29th Apr 2009 09:48 PM
How do I delete a selected block of text without confirming delete =?Utf-8?B?a2Vycnk=?= Microsoft Word Document Management 2 21st Jun 2006 01:28 PM
How do I delete a selected block of text without confirming delete =?Utf-8?B?a2Vycnk=?= Microsoft Word Document Management 0 21st Jun 2006 01:04 PM
delete columns and rows-cells equalling zero or any selected value =?Utf-8?B?U2NvdHRpZQ==?= Microsoft Excel Worksheet Functions 2 9th May 2005 08:47 PM
Re: When I highlight a sentence to delete, Word won't let me. I have to backspace. How can I deleted selected text with my delete key? Bill Foley Microsoft Word Document Management 1 4th Feb 2004 11:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:14 PM.