Hello everyone,
I'm a
VB.Net beginner and I have an assignment that I'm stuck on. Would really appreciate your advice as soon as possible.
I have variables (start1, end1, num1, start2, end2, num2, start3, end3, num3 etc.) that eventually should populate the table. The rows may have the repeat values in the Col3. If I populate the table without the condensing the rows the table will look something like this:
0 10,000 0.1
10,000 20,000 0.25
20,000 30,000 0.25
30,000 40,000 0.4
40.000 50.000 0.6
50,000 60,000 0.6
60,000 70,000 0.6
I need to find the rows where the Col3 has the repeat values, condense these rows and also update the value in the Col2 with the largest number. It should look like this:
0 10,000 0.1
10,000 30,000 0.25
30,000 40,000 0.4
40.000 70,000 0.6
I wouldn't know up front if there are rows to condense for a particular case or not and if there are then how many of them and where there are located. My final distinct table might have from 1 to approximately 12 rows depending on how many dups there are.
What would be the best technique to use here to look through my variables and identify the rows to condense?
Thank you very much!
Gina