HI there,
Currently I have a sample data structure of the following type.
My idea is to have something as versatile as Pivotable.
Pivotable Option 1 (Options, Value) (Count by Options):
Pivotable Option 2 (Value, Options, ) (Count by Value):
Option 1:
I try to put both column into a dicitonary, Try getting all the key individually, no problem.Try getting all the pair individually, no problem. I look up the api, found out Key can only set the object. So I pause here.
https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/dictionary-object
Option 2:
Create 2 list. Here is what I did. A lot of copy and pasting involved. Can't insert here. Otherwise 403
Option 3:
Create H,M,L object with a collection of Y,N,maybe object. When I create a list H,M,L object add in Y,N,maybe object ok ,but enumerate through Y,N,maybe object failed.
Required assistance specifically for VBA, if not data structure suggestion will be fine.
Currently I have a sample data structure of the following type.
My idea is to have something as versatile as Pivotable.
Rating Options
High Yes
Low No
Medium Maybe
Low No
High Maybe
Medium Yes
Low Yes
High Yes
High Yes
Low No
High No
High Maybe
Pivotable Option 1 (Options, Value) (Count by Options):
Row Labels Count of Options
High 6
Maybe 2
No 1
Yes 3
Low 4
No 3
Yes 1
Medium 2
Maybe 1
Yes 1
Grand Total 12
Pivotable Option 2 (Value, Options, ) (Count by Value):
Row Labels Count of Options
Maybe 3
High 2
Medium 1
No 4
High 1
Low 3
Yes 5
High 3
Low 1
Medium 1
Grand Total 12
Option 1:
I try to put both column into a dicitonary, Try getting all the key individually, no problem.Try getting all the pair individually, no problem. I look up the api, found out Key can only set the object. So I pause here.
https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/dictionary-object
Code:
Item Sets or returns the value of an item in a Dictionary object.
[B]Key [/B]Sets a new key value for an existing key value in a Dictionary object.
Option 2:
Create 2 list. Here is what I did. A lot of copy and pasting involved. Can't insert here. Otherwise 403
Option 3:
Create H,M,L object with a collection of Y,N,maybe object. When I create a list H,M,L object add in Y,N,maybe object ok ,but enumerate through Y,N,maybe object failed.
Required assistance specifically for VBA, if not data structure suggestion will be fine.
Last edited:
