Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 806
Default Excel Matrix problem

Hello,

Or with a VBA function:
Function ap(vI As Variant) As Variant
Dim i As Long, j As Long, k As Long
ReDim vR(1 To (vI.Rows.Count -1)* (vI.Columns.Count -1), _
1 To 3) As Variant
k = 1
For i = 2 To vI.Rows.Count
For j = 2 To vI.Columns.Count
vR(k, 1) = vI(i, 1)
vR(k, 2) = vI(1, j)
vR(k, 3) = vI(i, j)
k = k + 1
Next j
Next i
ap = vR
End Function

Select a sufficient long range of rows (row count - 1 * column count -
1 of your input array) with 3 columns and array-enter =ap(A1:G13) if
your input data is in A1:G13.

Regards,
Bernd
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
Problem selecting a whole data matrix [email protected] Excel Programming 2 May 29th 07 08:05 PM
Problem with a selection in a matrix-function Peter Sellmeijer Excel Programming 3 August 29th 06 02:49 AM
Excel problem with dynamic matrix with a name jgmiddel[_7_] Excel Programming 0 April 3rd 06 11:31 PM
Matrix Problem Jeff Excel Discussion (Misc queries) 1 February 4th 06 07:36 PM
vba problem lookup in a matrix Jean-Pierre D via OfficeKB.com Excel Programming 6 September 1st 05 07:09 PM


All times are GMT +1. The time now is 09:48 AM.

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"