Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
avi avi is offline
external usenet poster
 
Posts: 195
Default Transpose simple question

Hello,

I have a one dimensional array (one column, many rows). I try to
transpose it so to get one row, many columns but don't succeed

A simple example
Dim myarray As Variant
Dim myarrayT As Variant
myarray = xlApp.ActiveSheet.Range("A1:A10")
myarrayT = xlApp.Transpose(myarray)
MsgBox UBound(myarrayT, 1) returns the number of rows of the
original array (instead of 1)
MsgBox UBound(myarrayT, 2) does'nt work (out of range)

Do I miss something?
Remark: I am working in VB6

Thanks a lot
Avi


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Transpose simple question

You original arrray has 10 rows and 1 column
your transpose array as 1 row and 10 columns

the rows is the first item in Ubound and the columns the 2nd item

MsgBox UBound(myarrayT, 1) returns 10 which it correct

MsgBox UBound(myarrayT, 0) will return 1

"avi" wrote:

Hello,

I have a one dimensional array (one column, many rows). I try to
transpose it so to get one row, many columns but don't succeed

A simple example
Dim myarray As Variant
Dim myarrayT As Variant
myarray = xlApp.ActiveSheet.Range("A1:A10")
myarrayT = xlApp.Transpose(myarray)
MsgBox UBound(myarrayT, 1) returns the number of rows of the
original array (instead of 1)
MsgBox UBound(myarrayT, 2) does'nt work (out of range)

Do I miss something?
Remark: I am working in VB6

Thanks a lot
Avi



  #3   Report Post  
Posted to microsoft.public.excel.programming
avi avi is offline
external usenet poster
 
Posts: 195
Default Transpose simple question

Thanks

but MsgBox UBound(myarrayT, 0) returns "out of range"

Avi
  #4   Report Post  
Posted to microsoft.public.excel.programming
avi avi is offline
external usenet poster
 
Posts: 195
Default Transpose simple question

Thanks

but MsgBox UBound(myarrayT, 0) returns "out of range"

Avi
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Transpose simple question

MsgBox UBound(myarrayT, 1)

this is a vector, hence only has one dimension

"avi" wrote in message
...
Hello,

I have a one dimensional array (one column, many rows). I try to
transpose it so to get one row, many columns but don't succeed

A simple example
Dim myarray As Variant
Dim myarrayT As Variant
myarray = xlApp.ActiveSheet.Range("A1:A10")
myarrayT = xlApp.Transpose(myarray)
MsgBox UBound(myarrayT, 1) returns the number of rows of the
original array (instead of 1)
MsgBox UBound(myarrayT, 2) does'nt work (out of range)

Do I miss something?
Remark: I am working in VB6

Thanks a lot
Avi




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
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
Transpose Question carl Excel Worksheet Functions 2 June 8th 06 06:58 PM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
Further Question about Transpose Florence Excel Worksheet Functions 3 June 6th 05 06:58 AM
simple question, hopefully a simple answer! Matt B Excel Programming 5 January 13th 04 08:43 PM


All times are GMT +1. The time now is 03:52 PM.

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"