Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default Eliminate Variant Array Elements

Load array with worksheet range
Dim x as variant
x = Range(MyRange) ' n x 2 range
run process on array
How to eliminate elements (n, 1) and (n, 2)
to leave an (n-1) x (2) array?
I beleive that I cannot use ReDim on this type of array?
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Eliminate Variant Array Elements

Your question is difficult to follow and ambiguous. From what I do follow,
you can use ReDim Preserve but only on the last dimension. Otherwise make a
new array sized to suit and copy what you want from the original into it
(means looping both dimensions)

Of course the simplest way would be to size and populate the array with what
you want in the first place. Append the range with .Resize() or possibly
..Offset().Resize() to suit

Regards,
Peter T


"David" wrote in message
...
Load array with worksheet range
Dim x as variant
x = Range(MyRange) ' n x 2 range
run process on array
How to eliminate elements (n, 1) and (n, 2)
to leave an (n-1) x (2) array?
I beleive that I cannot use ReDim on this type of array?
Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Eliminate Variant Array Elements

David wrote:
Load array with worksheet range
Dim x as variant
x = Range(MyRange) ' n x 2 range
run process on array
How to eliminate elements (n, 1) and (n, 2)
to leave an (n-1) x (2) array?
I beleive that I cannot use ReDim on this type of array?
Thanks

If the functions in the freely downloadable file at
http://home.pacbell.net/beban are available to your workbook

x=SubArray(x,,,2)

Alan Beban
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
Array problem: Key words-Variant Array, single-element, type mismatch error davidm Excel Programming 6 November 9th 05 05:54 AM
Array problem: Key words-Variant Array, single-element, type mismatch error davidm Excel Programming 1 November 8th 05 04:21 AM
ReDim Object array as parameter of Variant array Peter T Excel Programming 4 May 10th 05 02:11 PM
Variant Array Steph[_3_] Excel Programming 1 June 2nd 04 01:29 AM
variant array containing cel adresses convert to actual ranges-array Peter[_21_] Excel Programming 5 December 10th 03 09:50 PM


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