MikeCook69
New Member
- Joined
- Jun 4, 2018
- Messages
- 4
I have 2 worksheets. The first work sheet has my raw data. The second worksheet has a list that I am trying to find the max and min values of the raw data and the sum. My data is not sorted.
Worksheet 1
[TABLE="width: 200"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]g[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]e[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]g[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]14[/TD]
[/TR]
[TR]
[TD]g[/TD]
[TD]4[/TD]
[TD]4[/TD]
[TD]16[/TD]
[/TR]
[TR]
[TD]e[/TD]
[TD]3[/TD]
[TD]5[/TD]
[TD]14[/TD]
[/TR]
[TR]
[TD]f[/TD]
[TD]2[/TD]
[TD]6[/TD]
[TD]13[/TD]
[/TR]
[TR]
[TD]e[/TD]
[TD]4[/TD]
[TD]3[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]g[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Worksheet 2
[TABLE="width: 200"]
<tbody>[TR]
[TD]A[/TD]
[TD]Min B[/TD]
[TD]Max C[/TD]
[TD]Sum D[/TD]
[/TR]
[TR]
[TD]g[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]e[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So I'm trying to get the following results.
[TABLE="width: 200"]
<tbody>[TR]
[TD]A[/TD]
[TD]Min B[/TD]
[TD]Max C[/TD]
[TD]Sum D[/TD]
[/TR]
[TR]
[TD]g[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]52[/TD]
[/TR]
[TR]
[TD]e[/TD]
[TD]2[/TD]
[TD]4[/TD]
[TD]36[/TD]
[/TR]
</tbody>[/TABLE]
I was trying to use a loop with nested if statements but I'm not sure if that is the most efficient method. I also might be making this more complicated that I need to.
Worksheet 1
[TABLE="width: 200"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]g[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]e[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]g[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]14[/TD]
[/TR]
[TR]
[TD]g[/TD]
[TD]4[/TD]
[TD]4[/TD]
[TD]16[/TD]
[/TR]
[TR]
[TD]e[/TD]
[TD]3[/TD]
[TD]5[/TD]
[TD]14[/TD]
[/TR]
[TR]
[TD]f[/TD]
[TD]2[/TD]
[TD]6[/TD]
[TD]13[/TD]
[/TR]
[TR]
[TD]e[/TD]
[TD]4[/TD]
[TD]3[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]g[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Worksheet 2
[TABLE="width: 200"]
<tbody>[TR]
[TD]A[/TD]
[TD]Min B[/TD]
[TD]Max C[/TD]
[TD]Sum D[/TD]
[/TR]
[TR]
[TD]g[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]e[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So I'm trying to get the following results.
[TABLE="width: 200"]
<tbody>[TR]
[TD]A[/TD]
[TD]Min B[/TD]
[TD]Max C[/TD]
[TD]Sum D[/TD]
[/TR]
[TR]
[TD]g[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]52[/TD]
[/TR]
[TR]
[TD]e[/TD]
[TD]2[/TD]
[TD]4[/TD]
[TD]36[/TD]
[/TR]
</tbody>[/TABLE]
I was trying to use a loop with nested if statements but I'm not sure if that is the most efficient method. I also might be making this more complicated that I need to.