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: 371
Default Columns by numbers

I cannot work out how to refer to a group of columns by numbers.
this doesn't work or any varaition using Columns intead of Range:

Dim startCol as Byte, endCol as Byte

Range(Columns(startCol), Columns(startCol + 1), Columns(endCol)).AutoFit

Listing each column separately works but how can I group them on 1 line?

Columns(startCol).AutoFit
Columns(startCol +1).AutoFit
Columns(endCol).AutoFit

Could someone please help?

Geoff
 
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
compare 2 columns of numbers and place the matched numbers in a 3r Clive[_2_] Excel Discussion (Misc queries) 5 November 8th 09 12:50 AM
split range of numbers in two columns to as many as numbers in ran arsovat Excel Discussion (Misc queries) 2 October 30th 06 03:57 PM
Find similar numbers from two columns of numbers Dennis Andrews Excel Discussion (Misc queries) 1 November 30th 05 07:54 AM
Numbers in columns Jenn Excel Discussion (Misc queries) 2 November 7th 05 03:54 PM
Numbers in Columns kellyaek Excel Discussion (Misc queries) 2 December 3rd 04 03:51 PM


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