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: 125
Default NEED HELP with Range command

Thanks for the help Jim, however allthough the "visible=false" was a good Idea
unfortunitly it will not work for what I need to do.

You see basicly what I am doing is I have a working code that takes chart
series values and locates them in there corisponding spread sheet. The
problem is that I want to delete all of irrelavent data columns in the same
spread sheet, thus only leaving the cloumns that are linked to data series on
my chart.
however when I use the Range("A:A,B:B,F:F.... ect ..ect ) command it doesn't
work once I get too man columns listed I think I can get up to "AF" and than
the range command seems to run out of gas and goes dumb (Excel VBA just
ignors that line all together).

I thought of trying to do this with using the column command but havent
been able to get that to work etiher.

Any more thoughts Anyone ?


"Jim Jackson" wrote:

If you are copying certain columns to paste in another workbook you might
consider hiding the unwanted columns.

Columns("D:E").visible = false
Columns("G:AA").visible=false

etc.

then you can have Range("A1:DF3000").select
Selection.copy

The only columns copied will be the visible ones.

Jim


"Dan Thompson" wrote:

Hi All,
Ok I am using the Range command to select multiple columns like this..

Range("A:A,B:B,C:C,F:F,AB:AB,AC:AC,BF:BF").Select

The problem I am having is my actual range of columns includes many more
columns that the example above.

Is there a maximum to how man columns you can include to select with the
range command ?
because the range command fails when I get to man coluns listed like say 200
or more.
Is there another way to accomplish this ? because all I realy want to do is
have vba do the same thing as if I manual selected up to 200 columns with the
mouse while holding down the Ctrl button.


 
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
I need Help With Range Command Dan Thompson Excel Programming 2 July 10th 06 08:20 PM
Using variables in the Range command Chi Man Wong Excel Programming 2 March 2nd 05 03:35 PM
Need help using a variable in Range command cbeebe[_7_] Excel Programming 1 November 5th 04 05:29 PM
Setting Range Command Frank Stone Excel Programming 1 July 21st 04 11:02 PM
How Do I Expand A Set Range In The Match Command Minitman[_4_] Excel Programming 2 April 25th 04 05:49 AM


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