Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a problem I am tryign to solve using VBA. I was wondering of anyone
was up to the challenge in helping me solve the issue. I have two sets of data stored in two dictionaries. I want to be able to compare the data and solve and come up with a solution to what has changed in the revised data. Assume I have que. In this que, I have empty spots. For fun lets say its a que at a movie theatre with people in line who can also save spots for friends who have not arrived yet. The empty spots are as follows: Position 157 Position 153 Position 152 Position 136 Position 106 Position 105 Position 104 Position 103 Position 95 Position 59 Position 35 Position 3 Then a bunch of new empty positions are created for the que. For fun lets say that some new people enter the que and/or these new or existing people save additional spots for friends. The new empty slots in the que are as follows: Position 163 Position 162 Position 161 Position 160 Position 158 Position 154 Position 153 Position 137 Position 107 Position 106 Position 105 Position 104 Position 96 Position 60 Position 36 Position 20 Position 3 I will always know in advance what the total difference in positions (empty + filled) is. In this example I will know in advance that the ques differ by 6 spaces. And I will always have the two resulting data sets. I need a function to figure out where the empty slots were created in the original que and where the new filled spots are. I want to be able to compare the data in the ques (dictionary object) and attempt to figure out where the 6 spaces came about. You know from looking at the data above that Position 3 is still the same. So any new position had to be created after Position 3. The correct answer here is that I created 1 new empty spot at Position 20, 4 new empty spots at Positions 159-162, and 1 new filled spot at Position 163. 1 + 4 + 1 = 6. Can anyone provide me with some insight as to how to compare these data sets to solve this problem? I might be more of a math question than a VBA question but I since I am using VBA, it will still be helpful! Thanks EM |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Iterating over a nested Dictionary object | Excel Programming | |||
iterating through a Dictionary object | Excel Programming | |||
ByRef argument type mismatch when passing dictionary object | Excel Programming | |||
Using the Dictionary object | Excel Programming | |||
Dictionary Object in Windows XP | Excel Programming |