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: 265
Default Selecting the secon column of a separate range

that is what I wanted to explain; what I want is the column number and not
the number of columns. (1 for the range a1:a4 and 3 for the range c1:c4.

Thanks

"JP" wrote:

Are you saying that you are selecting two separate areas of your
worksheet using Ctrl-Click(drag)?

If you highlight A1:A4 and C1:C4 and both are selected,
Selection.Areas.Count will give you the correct number (2).


HTH,
JP


On Jan 15, 9:47 am, filo666 wrote:
Hello, I'm working with graphs, what I want to do is a kind of difficult to
explain, I hope you understand what I'm trying to say.

I have The following data:

a b c d
1 Time Flow pressure permeate
2 1 3 40 .23
3 2 3.2 40.1 .24
4 3 3.2 40 .2

and so on

I press the control key in the cell A1 and I left clik and slide the pointer
from a1 to a4; then I stop pressing the left key of my mouse and go to the
cell c1 and presing the key control I repeat the same operation; then I have
a range composed by two different columns; wath I want VB to do is to tell me
the column number of the first and second selected columns (and thirt,
fourth, or any amount of columns selected)

I must mention that the ranges are allways from left to right and not at the
bottom (and all the ranges are allineated).

what I tried:

g = Selection.Columns.Count; it gives me the number 1 and that is wrong
because I have 2 columns (and I was expecting the value of column c=3).

the range is:

"a1:a4,c1:c4" and not "a1:c4"

I hope you understood.

TIA



 
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
Summarising a range in a column into a separate column Aidan[_2_] Excel Worksheet Functions 0 March 28th 07 03:06 AM
Summarising a range in a column into a separate column Toppers Excel Worksheet Functions 0 March 28th 07 01:50 AM
Summarising a range in a column into a separate column karmel Excel Worksheet Functions 0 March 28th 07 12:54 AM
selecting a range according to the longest column John Smith Excel Programming 2 August 5th 06 03:40 AM
Selecting Column Range Desert Piranha[_14_] Excel Programming 2 December 10th 05 09:38 PM


All times are GMT +1. The time now is 03:04 AM.

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"