Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default union method for non-adjacent ranges

To the best of my recollection
MMULT is limited to matices with about 73 rows and 73 columns. MINVERSE is
about 52 rows x 52 columns.

Anyway, it is a lot less than 256 columns.

Union will create a reference to non-adjacent ranges, but it doesn't make
them into a single area.

--
Regards,
Tom Ogilvy

"felix" wrote in message
...
Hi there,

I am trying to combine two non-adjacent ranges. The
resulting range shall then be multiplied with another
range created the same way using the mmult worksheet
function.
However, apparently the union statement cannot combine non-
adjacent ranges, but only adjacent ranges.
I am running into this problem because I need to perform
matrix calculations with a matrix exceeding the 256
columns a worksheet provides.

Any help will be greatly appreciated!
Felix

Code

Note: a and cd are column ranges, b and ef are row ranges

Dim Result As Range
Set Result = Range("Result")
Dim a, b, cd, ef, acd, bef As Variant

Set a = Range("a")
Set b = Range("b")
Set cd = Range("cd")
Set ef = Range("ef")

acd = Union(a, cd)
bef = Union(b, ef)

Result = Application.WorksheetFunction.MMult(bef, acd)

End Sub



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
Quick question on naming a union of ranges [email protected] Excel Discussion (Misc queries) 2 July 29th 07 11:15 AM
how can I print non-adjacent ranges on one page steve Excel Discussion (Misc queries) 2 April 5th 06 04:36 PM
printing Union of Ranges anny Excel Worksheet Functions 2 January 26th 06 10:22 AM
union method for non-adjacent ranges Jim Rech Excel Programming 0 September 16th 03 02:17 PM
VBA union of two ranges s[_2_] Excel Programming 1 August 21st 03 02:18 AM


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

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"