Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default reading values from multi-area selection

I have this situation where user picks selected columns in the table ... when
I am trying to read the values its giving me only first selected area values.
I need to read the values row wise, is there anyway that I can read each row
into an array?

For example:

Table
A B C D
1 2 3 4
3 6 8 9

user selects columns A and C .. in this case when I read second row values
I shud get an array with 1, 3 values

Similar thing is required for columns, like user selects row1, row2 and when
I read the column values I should get array with values A, 1.

There can many multiple-area selections. Just wondering is there any simple
to figure this out.

I am doing this in C#. Any help or suggestions would be appreaciated.

thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default reading values from multi-area selection


Loop thru the Selection areas...
'--
For Each rArea in Selection.Areas
For Each rCell in rArea
'add rcell value to the array
Next
Next
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"guest"
wrote in message
I have this situation where user picks selected columns in the table ... when
I am trying to read the values its giving me only first selected area values.
I need to read the values row wise, is there anyway that I can read each row
into an array?

For example:

Table
A B C D
1 2 3 4
3 6 8 9

user selects columns A and C .. in this case when I read second row values
I shud get an array with 1, 3 values
Similar thing is required for columns, like user selects row1, row2 and when
I read the column values I should get array with values A, 1.
There can many multiple-area selections. Just wondering is there any simple
to figure this out.
I am doing this in C#. Any help or suggestions would be appreaciated.
thanks.
Reply
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
Multi area Array using IRR function Malakite Excel Worksheet Functions 2 September 16th 09 01:32 PM
Use values instead of labels on X-axis in Area/Stacked Area Charts Ryan Charts and Charting in Excel 1 November 21st 06 04:14 PM
Multi-colour 'Area' chart germullen Excel Discussion (Misc queries) 3 May 4th 06 04:08 PM
Multi-colour Area chart (see attachment) germullen Charts and Charting in Excel 1 May 4th 06 09:12 AM
Extract values from a multi-select multi-column list-box Peter[_20_] Excel Programming 5 September 28th 03 04:04 PM


All times are GMT +1. The time now is 10:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"