Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Extracting Specific dimensions/values from multidimensional array

Say I have sales data
ie 5 sales, on day 1, in year one, in currency x of a code "a".

what i want to do is be able to do is to convert all the currencies to
one currency and display the data by different codes.

i thought about using a 4 dimensional array, ie(code,ccy,year,day) and
inserting individual sales for each of the data points.

Day
code ccy Year 1 2
a x 1 5 20
a x 2 10
a y 1 5 20
a y 2 10
b x 1 5 20
b x 2 10
b y 1 5 20
b y 2 10

Once i have inserted this data into such an array, how do i extract
say all of the data for just code a for example?
in practice the number or currency for each code will be different,
and the number of codes will be different, but the number of years and
days will be the same for each code-ccy combination

(Context - Actuarial - this is a runoff/delay triangle)

Any help most appreciated!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default Extracting Specific dimensions/values from multidimensional array

Why don't you put your data in a worksheet?


--
urkec


" wrote:

Say I have sales data
ie 5 sales, on day 1, in year one, in currency x of a code "a".

what i want to do is be able to do is to convert all the currencies to
one currency and display the data by different codes.

i thought about using a 4 dimensional array, ie(code,ccy,year,day) and
inserting individual sales for each of the data points.

Day
code ccy Year 1 2
a x 1 5 20
a x 2 10
a y 1 5 20
a y 2 10
b x 1 5 20
b x 2 10
b y 1 5 20
b y 2 10

Once i have inserted this data into such an array, how do i extract
say all of the data for just code a for example?
in practice the number or currency for each code will be different,
and the number of codes will be different, but the number of years and
days will be the same for each code-ccy combination

(Context - Actuarial - this is a runoff/delay triangle)

Any help most appreciated!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Extracting Specific dimensions/values from multidimensional array

how do you mean i dont understand?

i dont know how to attach a file (it is rather large) on here. and the
data is already in a worksheet?

What I am looking for is methods how to extract certain elements, or
whole sub groups from an array, ie

x(1 To 2, 1 To 2, 1 To 2, 1 To 2)

so for example

Sub test()
Dim x As Variant

ReDim x(1 To 2, 1 To 2, 1 To 2, 1 To 2)
For i = 1 To 2
For j = 1 To 2
For k = 1 To 2
For l = 1 To 2

x(i, j, k, l) = 1

Next l
Next k
Next j
Next i

End Sub

how do i get what is in array x, back into a worksheet? but only for
say i=1 and j=2?

On 24 Apr, 14:08, urkec wrote:
Why don't you put your data in a worksheet?

--
urkec



" wrote:
Say I have sales data
ie 5 sales, on day 1, in year one, in currency x of a code "a".


what i want to do is be able to do is to convert all the currencies to
one currency and display the data by different codes.


i thought about using a 4 dimensional array, ie(code,ccy,year,day) and
inserting individual sales for each of the data points.


Day
code ccy Year 1 2
a x 1 5 20
a x 2 10
a y 1 5 20
a y 2 10
b x 1 5 20
b x 2 10
b y 1 5 20
b y 2 10


Once i have inserted this data into such an array, how do i extract
say all of the data for just code a for example?
in practice the number or currency for each code will be different,
and the number of codes will be different, but the number of years and
days will be the same for each code-ccy combination


(Context - Actuarial - this is a runoff/delay triangle)


Any help most appreciated!- Hide quoted text -


- Show quoted text -



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Extracting Specific dimensions/values from multidimensional array

If you data is already on the WS, why not use Excel's features/function like
Filter, Sort, Count, Sum, VLOOKUP etc to find your result.
Arrays are fast, but I think will find it complex working with 4-D arrays.
Possibly using customs Types, you can simplify it, but the worksheet
approach would seem simpler.

NickHK

"Notpinky" wrote in message
oups.com...
how do you mean i dont understand?

i dont know how to attach a file (it is rather large) on here. and the
data is already in a worksheet?

What I am looking for is methods how to extract certain elements, or
whole sub groups from an array, ie

x(1 To 2, 1 To 2, 1 To 2, 1 To 2)

so for example

Sub test()
Dim x As Variant

ReDim x(1 To 2, 1 To 2, 1 To 2, 1 To 2)
For i = 1 To 2
For j = 1 To 2
For k = 1 To 2
For l = 1 To 2

x(i, j, k, l) = 1

Next l
Next k
Next j
Next i

End Sub

how do i get what is in array x, back into a worksheet? but only for
say i=1 and j=2?

On 24 Apr, 14:08, urkec wrote:
Why don't you put your data in a worksheet?

--
urkec



" wrote:
Say I have sales data
ie 5 sales, on day 1, in year one, in currency x of a code "a".


what i want to do is be able to do is to convert all the currencies to
one currency and display the data by different codes.


i thought about using a 4 dimensional array, ie(code,ccy,year,day) and
inserting individual sales for each of the data points.


Day
code ccy Year 1 2
a x 1 5 20
a x 2 10
a y 1 5 20
a y 2 10
b x 1 5 20
b x 2 10
b y 1 5 20
b y 2 10


Once i have inserted this data into such an array, how do i extract
say all of the data for just code a for example?
in practice the number or currency for each code will be different,
and the number of codes will be different, but the number of years and
days will be the same for each code-ccy combination


(Context - Actuarial - this is a runoff/delay triangle)


Any help most appreciated!- Hide quoted text -


- Show quoted text -





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Extracting Specific dimensions/values from multidimensional array

Its not really practical to do so, as I am working with 65000 by 50
cells, and calculations need to be made on the fly, ie adjusting for
currencies.

what im really looking for, is the correct method or syntax, to
extract particular dimensions from the array

any help most appreciated.


On 25 Apr, 10:32, "NickHK" wrote:
If you data is already on the WS, why not use Excel's features/function like
Filter, Sort, Count, Sum, VLOOKUP etc to find your result.
Arrays are fast, but I think will find it complex working with 4-D arrays.
Possibly using customs Types, you can simplify it, but the worksheet
approach would seem simpler.

NickHK

"Notpinky" wrote in message

oups.com...



how do you mean i dont understand?


i dont know how to attach a file (it is rather large) on here. and the
data is already in a worksheet?


What I am looking for is methods how to extract certain elements, or
whole sub groups from an array, ie


x(1 To 2, 1 To 2, 1 To 2, 1 To 2)


so for example


Sub test()
Dim x As Variant


ReDim x(1 To 2, 1 To 2, 1 To 2, 1 To 2)
For i = 1 To 2
For j = 1 To 2
For k = 1 To 2
For l = 1 To 2


x(i, j, k, l) = 1


Next l
Next k
Next j
Next i


End Sub


how do i get what is in array x, back into a worksheet? but only for
say i=1 and j=2?


On 24 Apr, 14:08, urkec wrote:
Why don't you put your data in a worksheet?


--
urkec


" wrote:
Say I have sales data
ie 5 sales, on day 1, in year one, in currency x of a code "a".


what i want to do is be able to do is to convert all the currencies to
one currency and display the data by different codes.


i thought about using a 4 dimensional array, ie(code,ccy,year,day) and
inserting individual sales for each of the data points.


Day
code ccy Year 1 2
a x 1 5 20
a x 2 10
a y 1 5 20
a y 2 10
b x 1 5 20
b x 2 10
b y 1 5 20
b y 2 10


Once i have inserted this data into such an array, how do i extract
say all of the data for just code a for example?
in practice the number or currency for each code will be different,
and the number of codes will be different, but the number of years and
days will be the same for each code-ccy combination


(Context - Actuarial - this is a runoff/delay triangle)


Any help most appreciated!- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Extracting Specific dimensions/values from multidimensional array

Alan Beban has an add-in that manipulates arrays:
http://home.pacbell.net/beban/

NickHK

"Notpinky" wrote in message
ups.com...
Its not really practical to do so, as I am working with 65000 by 50
cells, and calculations need to be made on the fly, ie adjusting for
currencies.

what im really looking for, is the correct method or syntax, to
extract particular dimensions from the array

any help most appreciated.


On 25 Apr, 10:32, "NickHK" wrote:
If you data is already on the WS, why not use Excel's features/function

like
Filter, Sort, Count, Sum, VLOOKUP etc to find your result.
Arrays are fast, but I think will find it complex working with 4-D

arrays.
Possibly using customs Types, you can simplify it, but the worksheet
approach would seem simpler.

NickHK

"Notpinky" wrote in message

oups.com...



how do you mean i dont understand?


i dont know how to attach a file (it is rather large) on here. and the
data is already in a worksheet?


What I am looking for is methods how to extract certain elements, or
whole sub groups from an array, ie


x(1 To 2, 1 To 2, 1 To 2, 1 To 2)


so for example


Sub test()
Dim x As Variant


ReDim x(1 To 2, 1 To 2, 1 To 2, 1 To 2)
For i = 1 To 2
For j = 1 To 2
For k = 1 To 2
For l = 1 To 2


x(i, j, k, l) = 1


Next l
Next k
Next j
Next i


End Sub


how do i get what is in array x, back into a worksheet? but only for
say i=1 and j=2?


On 24 Apr, 14:08, urkec wrote:
Why don't you put your data in a worksheet?


--
urkec


" wrote:
Say I have sales data
ie 5 sales, on day 1, in year one, in currency x of a code "a".


what i want to do is be able to do is to convert all the

currencies to
one currency and display the data by different codes.


i thought about using a 4 dimensional array, ie(code,ccy,year,day)

and
inserting individual sales for each of the data points.


Day
code ccy Year 1 2
a x 1 5 20
a x 2 10
a y 1 5 20
a y 2 10
b x 1 5 20
b x 2 10
b y 1 5 20
b y 2 10


Once i have inserted this data into such an array, how do i

extract
say all of the data for just code a for example?
in practice the number or currency for each code will be

different,
and the number of codes will be different, but the number of years

and
days will be the same for each code-ccy combination


(Context - Actuarial - this is a runoff/delay triangle)


Any help most appreciated!- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -





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
extracting specific values and replacing in set column hudini Excel Discussion (Misc queries) 5 September 3rd 07 05:16 PM
Inserting Values in a Multidimensional Array from Two Different Controls shivboy[_3_] Excel Programming 2 June 8th 06 10:13 PM
Deleting Specific Dimensions of a 3D Array ExcelMonkey Excel Programming 2 February 23rd 06 01:57 PM
Multidimensional Array DavidMoeller Excel Programming 4 August 12th 04 08:12 PM
MAX of Multidimensional Array ZZZ Excel Programming 2 November 15th 03 03:32 PM


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