murrayjl03
New Member
- Joined
- Apr 23, 2015
- Messages
- 5
Hi All,
I am looking for a VB script which will help me combine information which I currently do manually.
I pasted the table which i currently have below and is in sheet 1.
I am looking for the following:
Any help would be massively appreciated and save a lot of time!
[TABLE="class: grid, width: 640"]
<tbody>[TR]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 384, colspan: 6"]Priority 1[/TD]
[/TR]
[TR]
[TD="align: left"]Fruit[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: left"]Count[/TD]
[TD="align: left"]Met SLA[/TD]
[TD="align: left"]SLA 1[/TD]
[TD="align: left"]Met SLA[/TD]
[TD="align: left"]SLA 2[/TD]
[TD="align: left"]MTTR[/TD]
[/TR]
[TR]
[TD="align: left"]Orange[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]21[/TD]
[/TR]
[TR]
[TD="align: left"]Orange[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]40%[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: left"]Bannana[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]14[/TD]
[/TR]
[TR]
[TD="align: left"]Apple[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: left"]Orange[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0%[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0%[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: left"]Apple[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]25%[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: left"]Peach[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]20%[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: left"]Peach[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0%[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0%[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: left"]Peach[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]40%[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]60%[/TD]
[TD="align: right"]2[/TD]
[/TR]
</tbody>[/TABLE]
I am looking for a VB script which will help me combine information which I currently do manually.
I pasted the table which i currently have below and is in sheet 1.
I am looking for the following:
- Sheet 2 Col A should show all the types of fruit from Sheet 1 Col A without the duplicates e.g. only 1 instance of 'Apple'
- Sheet 2 Col B should have the sum of all the same types of fruit from Sheet 1 Col E E.g. Apple would have 5 (1+4)
- Sheet 2 Col C should have the sum of all the same types of fruit from Sheet 1 Col F E.g. Apple would have 2 (1+1)
- Sheet 2 Col E should have the sum of all the same types of fruit from Sheet 1 Col H E.g. Apple would have 3 (0+3)
- Sheet 2 Col G should have the average of all the same types of fruit from Sheet 1 Col J E.g. Apple would have 4 ((4x2)/2)
Any help would be massively appreciated and save a lot of time!
[TABLE="class: grid, width: 640"]
<tbody>[TR]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 384, colspan: 6"]Priority 1[/TD]
[/TR]
[TR]
[TD="align: left"]Fruit[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: left"]Count[/TD]
[TD="align: left"]Met SLA[/TD]
[TD="align: left"]SLA 1[/TD]
[TD="align: left"]Met SLA[/TD]
[TD="align: left"]SLA 2[/TD]
[TD="align: left"]MTTR[/TD]
[/TR]
[TR]
[TD="align: left"]Orange[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]21[/TD]
[/TR]
[TR]
[TD="align: left"]Orange[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]40%[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: left"]Bannana[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]14[/TD]
[/TR]
[TR]
[TD="align: left"]Apple[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: left"]Orange[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0%[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0%[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: left"]Apple[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]25%[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: left"]Peach[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]20%[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]100%[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: left"]Peach[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0%[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0%[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: left"]Peach[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]40%[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]60%[/TD]
[TD="align: right"]2[/TD]
[/TR]
</tbody>[/TABLE]