Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I resize a named array in Excel from a MxN array to a mxn .

How do I resize a named array in Excel from a M by N array to a m by n, where
m and n are variables?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default How do I resize a named array in Excel from a MxN array to amxn .

CymonM wrote:

How do I resize a named array in Excel from a M by N array to a m by n, where
m and n are variables?

Huh?

Alan Beban
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default How do I resize a named array in Excel from a MxN array to a mxn .

Either...

Redim NamedArray(m,n)

or if you don't want to lose the cdurrent array contents
when reallocating use...

ReDim Preserve NamedArray(m,n)

HTH,
Gary Brown

-----Original Message-----
CymonM wrote:

How do I resize a named array in Excel from a M by N

array to a m by n, where
m and n are variables?

Huh?

Alan Beban
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default How do I resize a named array in Excel from a MxN array to a mxn .

Look at the ReDim statement in the online-help.
It can only be done with dynamic array:
Eg:
Dim v() as string, v1(2,2) as string
'V1 cannot be re-dimensioned
'For V:
Redim V(1 to 2, 1 to 2)
v(1,1)="hello"
Redim V(1 to 3, 1 to 3) 'above , v is re-dimensioned... v(1,1) is now
empty-string
v(1,1)="world"
Redim Preserve V(1 to 3, 1 to 5) ' By using Preserve you can
re-dimension the
' last dimension of the array without loosing its values, ie
here,
' v(1,1) is still "world"
' but you can only do that on the last dimension.

Regards,
Sebastien
"CymonM" wrote:

How do I resize a named array in Excel from a M by N array to a m by n, where
m and n are variables?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default How do I resize a named array in Excel from a MxN array to amxn .

CymonM wrote:

How do I resize a named array in Excel from a M by N array to a m by n, where
m and n are variables?

Well, you've got a couple of partial answers.

What's the difference between your M by N array and the resized array
that is m by n? Is M by N different from m by n??? How is the M by N
array declared?

Alan Beban


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default How do I resize a named array in Excel from a MxN array to a mxn .

Alan,

Doesn't the OP just want your ArrayTranspose function?
Or the Excel worksheet function Transpose?

RBS



"Alan Beban" wrote in message
...
CymonM wrote:

How do I resize a named array in Excel from a M by N array to a m by n,
where m and n are variables?

Well, you've got a couple of partial answers.

What's the difference between your M by N array and the resized array that
is m by n? Is M by N different from m by n??? How is the M by N array
declared?

Alan Beban


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How do I resize a named array in Excel from a MxN array to a mxn .

doesn't sound like it

M X N could be 5 x 6 while m x n could be 2 x 15 or 3 x 10 for example.

--
Regards,
Tom Oglvy

"RB Smissaert" wrote in message
...
Alan,

Doesn't the OP just want your ArrayTranspose function?
Or the Excel worksheet function Transpose?

RBS



"Alan Beban" wrote in message
...
CymonM wrote:

How do I resize a named array in Excel from a M by N array to a m by n,
where m and n are variables?

Well, you've got a couple of partial answers.

What's the difference between your M by N array and the resized array

that
is m by n? Is M by N different from m by n??? How is the M by N array
declared?

Alan Beban




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default How do I resize a named array in Excel from a MxN array to amxn .

Tom Ogilvy wrote:
doesn't sound like it

M X N could be 5 x 6 while m x n could be 2 x 15 or 3 x 10 for example.

Or 13 by 17. Once you posit that m is a different size number than M,
there's no reason to think M*N=m*n, unless one were supposed to think
that that was implicit in the use of the word "resize".

And if something like the Transpose were sought, one would think that
the request would be about "resizing" from M by N to N by M.

Hey, the OP seems to be happy with the less than complete answers, so if
he/she is happy I can be happy for him/her.

Alan Beban
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 733
Default How do I resize a named array in Excel from a MxN array to a mxn .

"Alan Beban" wrote...
Tom Ogilvy wrote:
doesn't sound like it

M X N could be 5 x 6 while m x n could be 2 x 15 or 3 x 10 for example.

Or 13 by 17. Once you posit that m is a different size number than M,
there's no reason to think M*N=m*n, unless one were supposed to think
that that was implicit in the use of the word "resize".

....

Depends on whether the OP is used to different programming languages. FWLIW,
in APL

A is 6 5 rho iota 30

creates a 6 by 5 array like {1,2,3,4,5;6,..,10;...;26,..,30}, and

B is 3 11 rho A

is well-defined as

{1,2,..,11;12,13,..,22;23,24,..,30,1,2,3}

It's all a matter of where one's coming from, which the OP should have
stated.


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
Referencing a named array mooresk257 Excel Discussion (Misc queries) 1 October 26th 09 08:14 PM
Named Array KC Excel Qns Excel Worksheet Functions 7 July 22nd 09 05:33 AM
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 06:11 PM
Function to resize an array Juan Sanchez Excel Programming 4 July 5th 04 10:52 PM
Named Array Jag Man Excel Programming 2 December 20th 03 04:32 PM


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