Autofill data from above cell while Grouping

Vijaya Kanthi

New Member
Joined
Jul 27, 2018
Messages
14
Hello

I need a macro to re-create the below auto generated report in the below format

Original source:[TABLE="width: 504"]
<colgroup><col width="96" style="width: 72pt; mso-width-source: userset; mso-width-alt: 3510;" span="7"> <tbody>[TR]
[TD="width: 96, bgcolor: steelblue"]Process Code
[/TD]
[TD="width: 96, bgcolor: steelblue"]Date[/TD]
[TD="width: 96, bgcolor: steelblue"]Population Size[/TD]
[TD="width: 96, bgcolor: steelblue"]Sample Size[/TD]
[TD="width: 96, bgcolor: steelblue"]Pass[/TD]
[TD="width: 96, bgcolor: steelblue"]Fail[/TD]
[TD="width: 96, bgcolor: steelblue"]Quality Percent[/TD]
[/TR]
[TR]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] "]SLA-C&I Contracts C&I Query Portal[/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] "] [/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] , align: right"]105[/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] , align: right"]105[/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] , align: right"]105[/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] , align: right"]0[/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] , align: right"]100[/TD]
[/TR]
[TR]
[TD="width: 96, bgcolor: slategray"] [/TD]
[TD="width: 96, bgcolor: slategray"]02/07/2018[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]22[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]22[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]22[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]0[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]100[/TD]
[/TR]
[TR]
[TD="width: 96, bgcolor: slategray"] [/TD]
[TD="width: 96, bgcolor: slategray"]03/07/2018[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]17[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]17[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]17[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]0[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]100[/TD]
[/TR]
[TR]
[TD="width: 96, bgcolor: slategray"] [/TD]
[TD="width: 96, bgcolor: slategray"]04/07/2018[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]28[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]28[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]28[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]0[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]100[/TD]
[/TR]
[TR]
[TD="width: 96, bgcolor: slategray"] [/TD]
[TD="width: 96, bgcolor: slategray"]05/07/2018[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]19[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]19[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]19[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]0[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]100[/TD]
[/TR]
[TR]
[TD="width: 96, bgcolor: slategray"] [/TD]
[TD="width: 96, bgcolor: slategray"]06/07/2018[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]19[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]19[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]19[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]0[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]100[/TD]
[/TR]
[TR]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] "]SLA-C&I Contracts D0155 Incoming Flows[/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] "] [/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] , align: right"]123[/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] , align: right"]123[/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] , align: right"]123[/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] , align: right"]0[/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] , align: right"]100[/TD]
[/TR]
[TR]
[TD="width: 96, bgcolor: slategray"] [/TD]
[TD="width: 96, bgcolor: slategray"]02/07/2018[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]12[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]12[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]12[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]0[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]100[/TD]
[/TR]
[TR]
[TD="width: 96, bgcolor: slategray"] [/TD]
[TD="width: 96, bgcolor: slategray"]03/07/2018[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]23[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]23[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]23[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]0[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]100[/TD]
[/TR]
[TR]
[TD="width: 96, bgcolor: slategray"] [/TD]
[TD="width: 96, bgcolor: slategray"]04/07/2018[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]16[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]16[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]16[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]0[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]100[/TD]
[/TR]
[TR]
[TD="width: 96, bgcolor: slategray"] [/TD]
[TD="width: 96, bgcolor: slategray"]05/07/2018[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]59[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]59[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]59[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]0[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]100[/TD]
[/TR]
[TR]
[TD="width: 96, bgcolor: slategray"] [/TD]
[TD="width: 96, bgcolor: slategray"]06/07/2018[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]13[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]13[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]13[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]0[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]100[/TD]
[/TR]
[TR]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] "]SLA-C&I Contracts DCS CHASERS[/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] "] [/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] , align: right"]704[/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] , align: right"]704[/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] , align: right"]704[/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] , align: right"]0[/TD]
[TD="width: 96, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=6E9ECA]#6E9ECA[/URL] , align: right"]100[/TD]
[/TR]
[TR]
[TD="width: 96, bgcolor: slategray"] [/TD]
[TD="width: 96, bgcolor: slategray"]02/07/2018[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]1[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]1[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]1[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]0[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]100[/TD]
[/TR]
[TR]
[TD="width: 96, bgcolor: slategray"] [/TD]
[TD="width: 96, bgcolor: slategray"]03/07/2018[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]1[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]1[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]1[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]0[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]100[/TD]
[/TR]
[TR]
[TD="width: 96, bgcolor: slategray"] [/TD]
[TD="width: 96, bgcolor: slategray"]04/07/2018[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]1[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]1[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]1[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]0[/TD]
[TD="width: 96, bgcolor: slategray, align: right"]100[/TD]
[/TR]
</tbody>[/TABLE]

I want repot in the below format:
[TABLE="width: 731"]
<colgroup><col width="448" style="width: 336pt; mso-width-source: userset; mso-width-alt: 16384;"> <col width="54" style="width: 41pt; mso-width-source: userset; mso-width-alt: 1974;"> <col width="79" style="width: 59pt; mso-width-source: userset; mso-width-alt: 2889;" span="6"> <tbody>[TR]
[TD="width: 448, bgcolor: #0066CC"]Sub Process [/TD]
[TD="width: 54, bgcolor: #0066CC"]Target[/TD]
[TD="width: 79, bgcolor: #0066CC"]7/23/2018[/TD]
[TD="width: 79, bgcolor: #0066CC"]7/24/2018[/TD]
[TD="width: 79, bgcolor: #0066CC"]7/25/2018[/TD]
[TD="width: 79, bgcolor: #0066CC"]7/26/2018[/TD]
[TD="width: 79, bgcolor: #0066CC"]7/27/2018[/TD]
[TD="width: 79, bgcolor: #0066CC"]7/28/2018[/TD]
[/TR]
[TR]
[TD="bgcolor: #0066CC"] [/TD]
[TD="bgcolor: #0066CC"] [/TD]
[TD="bgcolor: #0066CC"] [/TD]
[TD="bgcolor: #0066CC"] [/TD]
[TD="bgcolor: #0066CC"] [/TD]
[TD="bgcolor: #0066CC"] [/TD]
[/TR]
[TR]
[TD="width: 448, bgcolor: transparent"]SWAN Dpg EELC L1[/TD]
[TD="bgcolor: #FFCC99"]98%[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[/TR]
[TR]
[TD="width: 448, bgcolor: transparent"]SWAN Dpg EELC L2
[/TD]
[TD="bgcolor: #FFCC99"]98%[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[/TR]
[TR]
[TD="width: 448, bgcolor: transparent"]SWAN Dpg EELC L3[/TD]
[TD="bgcolor: #FFCC99"]98%[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[/TR]
[TR]
[TD="width: 448, bgcolor: transparent"]SWAN Dpg EELC L4
[/TD]
[TD="bgcolor: #FFCC99"]98%[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[/TR]
[TR]
[TD="width: 448, bgcolor: transparent"]SWAN Dpg EELC L5[/TD]
[TD="bgcolor: #FFCC99"]98%[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[/TR]
[TR]
[TD="width: 448, bgcolor: transparent"]SWAN Dpg EELC L6[/TD]
[TD="bgcolor: #FFCC99"]98%[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[TD="bgcolor: transparent"]-[/TD]
[/TR]
[TR]
[TD="width: 448, bgcolor: transparent"]SWAN Dpg SIEM L1[/TD]
[TD="bgcolor: #FFCC99"]98%[/TD]
[TD="bgcolor: transparent"]100[/TD]
[TD="bgcolor: transparent"]100[/TD]
[TD="bgcolor: transparent"]100[/TD]
[TD="bgcolor: transparent"]100[/TD]
[TD="bgcolor: transparent"]100[/TD]
[TD="bgcolor: transparent"]-[/TD]
[/TR]
[TR]
[TD="width: 448, bgcolor: transparent"]SWAN Dpg SIEM L2
[/TD]
[TD="bgcolor: #FFCC99"]98%[/TD]
[TD="bgcolor: transparent"]100[/TD]
[TD="bgcolor: transparent"]100[/TD]
[TD="bgcolor: transparent"]100[/TD]
[TD="bgcolor: transparent"]100[/TD]
[TD="bgcolor: transparent"]100[/TD]
[TD="bgcolor: transparent"]-[/TD]
[/TR]
</tbody>[/TABLE]

Process code ( Source) will Sub process
Quality Percentage will be the data which needs to auto filled in the report and dates has to change according to the week....
if the macro can as for the dates while uploading the source...

Kindly advice

Regards,
K
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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