Best way to approach a nested dictionary with a nested collection

Status
Not open for further replies.

jrevball

New Member
Joined
Mar 3, 2020
Messages
4
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
Platform
  1. Windows
Hi,
I have an application that will have a nested dictionary within another dictionary. Within the nested dictionary, I want to have a collection class that is evaluated and replaced if certain criteria are met.
What is the best way to define this?

Example:
DICT1 contains keys (Part 1 - Part 6) and item DICT2.
DICT2 contains keys (various quantity ranges) and item Coll.
Coll has three variables (Price, supplier, and date), which will be evaluated and altered under certain criteria

I don't know how to go about populating the collection or accessing that collection as it populates to potentially replace data in the collection that meets certain criteria. The syntax is eluding me.

An example of what I mean in a table with the various elements in [brackets]. This would potentially be the output format of the data.
Part number [DICT 1]Qty range [DICT 2]Price [coll.price]Supplier [coll.supplier]Quote Date [coll.date]
Part 11 to 5
$124.94​
Supplier 2
11/16/2018​
6 to 10
$71.46​
Supplier 2
11/16/2018​
11 to 25
$52.08​
Supplier 2
11/16/2018​
51 to 100
$10.49​
Supplier 1
9/12/2018​
101 to 250
$8.85​
Supplier 1
9/12/2018​
Part 226 to 50
$58.32​
Supplier 3
10/5/2018​
51 to 100
$52.74​
Supplier 3
10/5/2018​
101 to 250
$49.41​
Supplier 3
10/5/2018​
Part 326 to 50
$45.88​
Supplier 3
10/5/2018​
51 to 100
$37.23​
Supplier 3
10/5/2018​
101 to 250
$32.02​
Supplier 3
10/5/2018​
Part 426 to 50
$18.51​
Supplier 3
10/5/2018​
51 to 100
$14.28​
Supplier 3
10/5/2018​
101 to 250
$11.76​
Supplier 3
10/5/2018​
Part 551 to 100
$18.84​
Supplier 3
10/5/2018​
101 to 250
$15.60​
Supplier 3
10/5/2018​
250+
$13.28​
Supplier 3
10/5/2018​
Part 626 to 50
$80.53​
Supplier 3
11/7/2018​
51 to 100
$60.23​
Supplier 3
11/7/2018​
101 to 250
$52.83​
Supplier 3
11/7/2018​


Any help or insight on how to optimally write this code or how to approach this problem would be fantastic!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
You could explain what the ultimate goal is.

I suppose that after storing the data in dictionaries or arrangements you want to access that data.

But you could explain a real scenario of what you have and the result you expect.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,558
Latest member
aivin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top