VBA Help

hoopslogan

Board Regular
Joined
Jun 21, 2016
Messages
94
Hi,

I am looking for help in creating a loop for excel file attached. In the file there is a source sheet and a destination sheet. On the destination sheet there are cells highlighted in yellow that need to be filled by data from the source sheet. For example, in row e column 1 of the destination sheet you will see the value A. The proceeding columns for that row need to be filled with the numbers that correspond to A and the right date. So row 3 column 2 value needs to be A for 6/30/2043. I need this done for this entire table. Any suggestions? Thanks!


SOURCE SHEET:

[TABLE="width: 1689"]
<colgroup><col><col span="5"><col span="5"><col span="5"></colgroup><tbody>[TR]
[TD][/TD]
[TD="colspan: 5"]T1[/TD]
[TD="colspan: 5"]T2[/TD]
[TD="colspan: 5"]T3[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]6/30/2043[/TD]
[TD]9/30/2043[/TD]
[TD]12/31/2043[/TD]
[TD]3/31/2044[/TD]
[TD]6/30/2044[/TD]
[TD]6/30/2043[/TD]
[TD]9/30/2043[/TD]
[TD]12/31/2043[/TD]
[TD]3/31/2044[/TD]
[TD]6/30/2044[/TD]
[TD]6/30/2043[/TD]
[TD]9/30/2043[/TD]
[TD]12/31/2043[/TD]
[TD]3/31/2044[/TD]
[TD]6/30/2044[/TD]
[/TR]
[TR]
[TD]Group 1[/TD]
[TD="align: right"]11094012834.57[/TD]
[TD="align: right"]11395646234.05[/TD]
[TD="align: right"]11697885090.24[/TD]
[TD="align: right"]11684977933.02[/TD]
[TD="align: right"]12065695232.33[/TD]
[TD="align: right"]3402575867.80[/TD]
[TD="align: right"]3214650959.38[/TD]
[TD="align: right"]3816644628.77[/TD]
[TD="align: right"]3471326906.44[/TD]
[TD="align: right"]3662880960.57[/TD]
[TD="align: right"]88316644.28[/TD]
[TD="align: right"]82444703.26[/TD]
[TD="align: right"]96018028.57[/TD]
[TD="align: right"]92584947.96[/TD]
[TD="align: right"]84829134.06[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]4518015237.31[/TD]
[TD="align: right"]4542415237.31[/TD]
[TD="align: right"]4754765237.31[/TD]
[TD="align: right"]4879083487.31[/TD]
[TD="align: right"]5003472852.22[/TD]
[TD="align: right"]683529468.11[/TD]
[TD="align: right"]594758665.61[/TD]
[TD="align: right"]610349219.42[/TD]
[TD="align: right"]614832479.53[/TD]
[TD="align: right"]790206283.35[/TD]
[TD="align: right"]5601265.30[/TD]
[TD="align: right"]7815120.34[/TD]
[TD="align: right"]9642315.16[/TD]
[TD="align: right"]8903154.88[/TD]
[TD="align: right"]8161113.52[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD="align: right"]3158336817.46[/TD]
[TD="align: right"]3405669269.52[/TD]
[TD="align: right"]3420011324.50[/TD]
[TD="align: right"]3359494677.18[/TD]
[TD="align: right"]3366086482.77[/TD]
[TD="align: right"]2242945950.93[/TD]
[TD="align: right"]2263670874.96[/TD]
[TD="align: right"]2394991391.98[/TD]
[TD="align: right"]2234730576.64[/TD]
[TD="align: right"]2254857030.45[/TD]
[TD="align: right"]37927447.50[/TD]
[TD="align: right"]35624983.42[/TD]
[TD="align: right"]39768996.95[/TD]
[TD="align: right"]36315345.34[/TD]
[TD="align: right"]36598169.84[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD="align: right"]1326300000.00[/TD]
[TD="align: right"]1321334578.30[/TD]
[TD="align: right"]1329402017.70[/TD]
[TD="align: right"]1252102017.70[/TD]
[TD="align: right"]1319602017.70[/TD]
[TD="align: right"]142173473.63[/TD]
[TD="align: right"]77590945.27[/TD]
[TD="align: right"]295207209.18[/TD]
[TD="align: right"]171822456.40[/TD]
[TD="align: right"]276175076.67[/TD]
[TD="align: right"]3327473.33[/TD]
[TD="align: right"]4556156.65[/TD]
[TD="align: right"]6371749.34[/TD]
[TD="align: right"]5103458.31[/TD]
[TD="align: right"]4676468.06[/TD]
[/TR]
[TR]
[TD]Group 2[/TD]
[TD="align: right"]8288742564.29[/TD]
[TD="align: right"]8885959785.95[/TD]
[TD="align: right"]9041997973.94[/TD]
[TD="align: right"]9410590310.60[/TD]
[TD="align: right"]9782268079.92[/TD]
[TD="align: right"]5347923545.07[/TD]
[TD="align: right"]5559431635.03[/TD]
[TD="align: right"]5382460223.14[/TD]
[TD="align: right"]5567383491.43[/TD]
[TD="align: right"]5816841659.32[/TD]
[TD="align: right"]370271289.47[/TD]
[TD="align: right"]350633462.38[/TD]
[TD="align: right"]364963015.08[/TD]
[TD="align: right"]366391040.67[/TD]
[TD="align: right"]357369338.89[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD="align: right"]7682341118.52[/TD]
[TD="align: right"]8293880317.98[/TD]
[TD="align: right"]8376023521.77[/TD]
[TD="align: right"]8722486471.30[/TD]
[TD="align: right"]9098766726.60[/TD]
[TD="align: right"]5015546696.53[/TD]
[TD="align: right"]5226968416.07[/TD]
[TD="align: right"]5033893883.41[/TD]
[TD="align: right"]5181642029.38[/TD]
[TD="align: right"]5424872745.42[/TD]
[TD="align: right"]316588695.54[/TD]
[TD="align: right"]302413910.58[/TD]
[TD="align: right"]318965498.12[/TD]
[TD="align: right"]318472439.71[/TD]
[TD="align: right"]314187124.72[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD="align: right"]1331314032.89[/TD]
[TD="align: right"]1573240901.49[/TD]
[TD="align: right"]1454130025.78[/TD]
[TD="align: right"]1588672658.00[/TD]
[TD="align: right"]1664509740.86[/TD]
[TD="align: right"]906273660.87[/TD]
[TD="align: right"]896492313.02[/TD]
[TD="align: right"]697908222.60[/TD]
[TD="align: right"]598805715.03[/TD]
[TD="align: right"]627588213.31[/TD]
[TD="align: right"]6416785.94[/TD]
[TD="align: right"]8968215.42[/TD]
[TD="align: right"]11340016.90[/TD]
[TD="align: right"]12912691.94[/TD]
[TD="align: right"]10873871.36[/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD="align: right"]102962482.05[/TD]
[TD="align: right"]83291001.26[/TD]
[TD="align: right"]69100412.04[/TD]
[TD="align: right"]69512343.92[/TD]
[TD="align: right"]67197076.75[/TD]
[TD="align: right"]81947853.63[/TD]
[TD="align: right"]69426919.40[/TD]
[TD="align: right"]55901907.24[/TD]
[TD="align: right"]56121916.10[/TD]
[TD="align: right"]54063696.52[/TD]
[TD="align: right"]11560653.28[/TD]
[TD="align: right"]8367025.83[/TD]
[TD="align: right"]6049238.45[/TD]
[TD="align: right"]6973280.48[/TD]
[TD="align: right"]1843882.75[/TD]
[/TR]
[TR]
[TD]Group 3[/TD]
[TD="align: right"]14135992987.73[/TD]
[TD="align: right"]14784457131.96[/TD]
[TD="align: right"]14342306229.87[/TD]
[TD="align: right"]15265568067.76[/TD]
[TD="align: right"]15728239738.20[/TD]
[TD="align: right"]7616433236.17[/TD]
[TD="align: right"]7992070887.18[/TD]
[TD="align: right"]8073304712.35[/TD]
[TD="align: right"]8518976461.52[/TD]
[TD="align: right"]8738685210.80[/TD]
[TD="align: right"]412129847.47[/TD]
[TD="align: right"]364006554.59[/TD]
[TD="align: right"]327190319.12[/TD]
[TD="align: right"]358456767.55[/TD]
[TD="align: right"]339003274.23[/TD]
[/TR]
[TR]
[TD]G[/TD]
[TD="align: right"]7501758841.84[/TD]
[TD="align: right"]7998064824.94[/TD]
[TD="align: right"]7558607148.13[/TD]
[TD="align: right"]8524891099.82[/TD]
[TD="align: right"]8866494193.91[/TD]
[TD="align: right"]2275910640.70[/TD]
[TD="align: right"]2732110067.39[/TD]
[TD="align: right"]2599423078.35[/TD]
[TD="align: right"]3069724498.35[/TD]
[TD="align: right"]3296406549.87[/TD]
[TD="align: right"]152013511.43[/TD]
[TD="align: right"]120880283.09[/TD]
[TD="align: right"]109197069.41[/TD]
[TD="align: right"]136504323.35[/TD]
[TD="align: right"]132910838.60[/TD]
[/TR]
[TR]
[TD]H[/TD]
[TD="align: right"]4319804187.84[/TD]
[TD="align: right"]4452364718.94[/TD]
[TD="align: right"]4517663359.04[/TD]
[TD="align: right"]4526811620.81[/TD]
[TD="align: right"]4721359723.52[/TD]
[TD="align: right"]3058918670.62[/TD]
[TD="align: right"]2959282031.87[/TD]
[TD="align: right"]3239310119.21[/TD]
[TD="align: right"]3275845690.29[/TD]
[TD="align: right"]3341870755.36[/TD]
[TD="align: right"]114789783.14[/TD]
[TD="align: right"]112981137.71[/TD]
[TD="align: right"]109793637.92[/TD]
[TD="align: right"]109616607.16[/TD]
[TD="align: right"]106842653.91[/TD]
[/TR]
[TR]
[TD]I[/TD]
[TD="align: right"]2314429958.05[/TD]
[TD="align: right"]2334027588.08[/TD]
[TD="align: right"]2266035722.70[/TD]
[TD="align: right"]2213865347.13[/TD]
[TD="align: right"]2140385820.77[/TD]
[TD="align: right"]2281603924.85[/TD]
[TD="align: right"]2300678787.92[/TD]
[TD="align: right"]2234571514.79[/TD]
[TD="align: right"]2173406272.88[/TD]
[TD="align: right"]2100407905.57[/TD]
[TD="align: right"]145326552.90[/TD]
[TD="align: right"]130145133.78[/TD]
[TD="align: right"]108199611.80[/TD]
[TD="align: right"]112335837.05[/TD]
[TD="align: right"]99249781.72[/TD]
[/TR]
</tbody>[/TABLE]


DESTINATION SHEET:

[TABLE="width: 466"]
<colgroup><col><col span="2"><col><col span="2"></colgroup><tbody>[TR]
[TD](Figures in $MM)[/TD]
[TD]6/30/2043[/TD]
[TD]9/30/2043[/TD]
[TD]12/31/2043[/TD]
[TD]3/31/2044[/TD]
[TD]6/30/2044[/TD]
[/TR]
[TR]
[TD]T1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]T2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]T3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
either the formatting is scrambled - or I am not seeing what you want

A is in first column so how can there be preceding columns ?
 
Upvote 0
Sorry for the confusion I meant to say the columns after that first column. So row 2 column one says A I need the values that correspond to the dates for A from the sourcesheet to be placed in the chart on the destination sheet in the Rows for A based on T1, T2, T3.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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