Program to Copy specific data with specific criteria at certain interval from one sheet to another

kiran8528

New Member
Joined
Dec 28, 2015
Messages
13
I am a student and working on my thesis. I am having issues in copying data as it is large in numbers. Data is at the interval of 5 min of hour spread over a day. such files of many years needed to be evaluated. My requirement is of hourly data. So i need a program that can be a great help to me.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Ok great. And we need some more information. What does your data look like? What cells need to be copied, when and why? What are the sheet names? How could you possibly expect an answer when you barely even describe the problem?
 
Upvote 0
[TABLE="width: 424"]
<colgroup><col><col span="5"></colgroup><tbody>[TR]
[TD]Time Stamp[/TD]
[TD]Name[/TD]
[TD]PTID[/TD]
[TD]LBMP ($/MWHr)[/TD]
[TD]Marginal Cost Losses ($/MWHr)[/TD]
[TD]Marginal Cost Congestion ($/MWHr)[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:05[/TD]
[TD]CAPITL[/TD]
[TD="align: right"]61757[/TD]
[TD="align: right"]34.42[/TD]
[TD="align: right"]2.13[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:05[/TD]
[TD]CENTRL[/TD]
[TD="align: right"]61754[/TD]
[TD="align: right"]32.32[/TD]
[TD="align: right"]0.03[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:05[/TD]
[TD]DUNWOD[/TD]
[TD="align: right"]61760[/TD]
[TD="align: right"]35.78[/TD]
[TD="align: right"]3.49[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:05[/TD]
[TD]GENESE[/TD]
[TD="align: right"]61753[/TD]
[TD="align: right"]31.55[/TD]
[TD="align: right"]-0.74[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:05[/TD]
[TD]H Q[/TD]
[TD="align: right"]61844[/TD]
[TD="align: right"]31.55[/TD]
[TD="align: right"]-0.74[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:05[/TD]
[TD]HUD VL[/TD]
[TD="align: right"]61758[/TD]
[TD="align: right"]35.88[/TD]
[TD="align: right"]3.58[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:05[/TD]
[TD]LONGIL[/TD]
[TD="align: right"]61762[/TD]
[TD="align: right"]64.16[/TD]
[TD="align: right"]4.52[/TD]
[TD="align: right"]-27.35[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:05[/TD]
[TD]MHK VL[/TD]
[TD="align: right"]61756[/TD]
[TD="align: right"]33.26[/TD]
[TD="align: right"]0.97[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:05[/TD]
[TD]MILLWD[/TD]
[TD="align: right"]61759[/TD]
[TD="align: right"]35.78[/TD]
[TD="align: right"]3.49[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:05[/TD]
[TD]N.Y.C.[/TD]
[TD="align: right"]61761[/TD]
[TD="align: right"]46.17[/TD]
[TD="align: right"]3.74[/TD]
[TD="align: right"]-10.13[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:05[/TD]
[TD]NORTH[/TD]
[TD="align: right"]61755[/TD]
[TD="align: right"]31.45[/TD]
[TD="align: right"]-0.84[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:05[/TD]
[TD]NPX[/TD]
[TD="align: right"]61845[/TD]
[TD="align: right"]34.72[/TD]
[TD="align: right"]2.42[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:05[/TD]
[TD]O H[/TD]
[TD="align: right"]61846[/TD]
[TD="align: right"]29.97[/TD]
[TD="align: right"]-2.33[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:05[/TD]
[TD]PJM[/TD]
[TD="align: right"]61847[/TD]
[TD="align: right"]32.45[/TD]
[TD="align: right"]0.16[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:05[/TD]
[TD]WEST[/TD]
[TD="align: right"]61752[/TD]
[TD="align: right"]30.45[/TD]
[TD="align: right"]-1.84[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:10[/TD]
[TD]CAPITL[/TD]
[TD="align: right"]61757[/TD]
[TD="align: right"]33.84[/TD]
[TD="align: right"]2.06[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:10[/TD]
[TD]CENTRL[/TD]
[TD="align: right"]61754[/TD]
[TD="align: right"]31.91[/TD]
[TD="align: right"]0.13[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:10[/TD]
[TD]DUNWOD[/TD]
[TD="align: right"]61760[/TD]
[TD="align: right"]35.11[/TD]
[TD="align: right"]3.34[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:10[/TD]
[TD]GENESE[/TD]
[TD="align: right"]61753[/TD]
[TD="align: right"]31.33[/TD]
[TD="align: right"]-0.44[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:10[/TD]
[TD]H Q[/TD]
[TD="align: right"]61844[/TD]
[TD="align: right"]31.02[/TD]
[TD="align: right"]-0.76[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:10[/TD]
[TD]HUD VL[/TD]
[TD="align: right"]61758[/TD]
[TD="align: right"]35.21[/TD]
[TD="align: right"]3.43[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:10[/TD]
[TD]LONGIL[/TD]
[TD="align: right"]61762[/TD]
[TD="align: right"]36.15[/TD]
[TD="align: right"]4.35[/TD]
[TD="align: right"]-0.02[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:10[/TD]
[TD]MHK VL[/TD]
[TD="align: right"]61756[/TD]
[TD="align: right"]32.73[/TD]
[TD="align: right"]0.95[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:10[/TD]
[TD]MILLWD[/TD]
[TD="align: right"]61759[/TD]
[TD="align: right"]35.11[/TD]
[TD="align: right"]3.34[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:10[/TD]
[TD]N.Y.C.[/TD]
[TD="align: right"]61761[/TD]
[TD="align: right"]45.62[/TD]
[TD="align: right"]3.59[/TD]
[TD="align: right"]-10.25[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:10[/TD]
[TD]NORTH[/TD]
[TD="align: right"]61755[/TD]
[TD="align: right"]30.92[/TD]
[TD="align: right"]-0.86[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:10[/TD]
[TD]NPX[/TD]
[TD="align: right"]61845[/TD]
[TD="align: right"]34.13[/TD]
[TD="align: right"]2.35[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:10[/TD]
[TD]O H[/TD]
[TD="align: right"]61846[/TD]
[TD="align: right"]29.94[/TD]
[TD="align: right"]-1.84[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:10[/TD]
[TD]PJM[/TD]
[TD="align: right"]61847[/TD]
[TD="align: right"]32.06[/TD]
[TD="align: right"]0.29[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:10[/TD]
[TD]WEST[/TD]
[TD="align: right"]61752[/TD]
[TD="align: right"]30.45[/TD]
[TD="align: right"]-1.33[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:15[/TD]
[TD]CAPITL[/TD]
[TD="align: right"]61757[/TD]
[TD="align: right"]34.5[/TD]
[TD="align: right"]2.14[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:15[/TD]
[TD]CENTRL[/TD]
[TD="align: right"]61754[/TD]
[TD="align: right"]32.49[/TD]
[TD="align: right"]0.13[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:15[/TD]
[TD]DUNWOD[/TD]
[TD="align: right"]61760[/TD]
[TD="align: right"]35.83[/TD]
[TD="align: right"]3.46[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:15[/TD]
[TD]GENESE[/TD]
[TD="align: right"]61753[/TD]
[TD="align: right"]31.78[/TD]
[TD="align: right"]-0.58[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:15[/TD]
[TD]H Q[/TD]
[TD="align: right"]61844[/TD]
[TD="align: right"]31.59[/TD]
[TD="align: right"]-0.78[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:15[/TD]
[TD]HUD VL[/TD]
[TD="align: right"]61758[/TD]
[TD="align: right"]35.96[/TD]
[TD="align: right"]3.59[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:15[/TD]
[TD]LONGIL[/TD]
[TD="align: right"]61762[/TD]
[TD="align: right"]64.07[/TD]
[TD="align: right"]4.5[/TD]
[TD="align: right"]-27.21[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:15[/TD]
[TD]MHK VL[/TD]
[TD="align: right"]61756[/TD]
[TD="align: right"]33.3[/TD]
[TD="align: right"]0.94[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:15[/TD]
[TD]MILLWD[/TD]
[TD="align: right"]61759[/TD]
[TD="align: right"]35.83[/TD]
[TD="align: right"]3.46[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:15[/TD]
[TD]N.Y.C.[/TD]
[TD="align: right"]61761[/TD]
[TD="align: right"]46.05[/TD]
[TD="align: right"]3.69[/TD]
[TD="align: right"]-10[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:15[/TD]
[TD]NORTH[/TD]
[TD="align: right"]61755[/TD]
[TD="align: right"]31.46[/TD]
[TD="align: right"]-0.91[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:15[/TD]
[TD]NPX[/TD]
[TD="align: right"]61845[/TD]
[TD="align: right"]34.79[/TD]
[TD="align: right"]2.43[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:15[/TD]
[TD]O H[/TD]
[TD="align: right"]61846[/TD]
[TD="align: right"]30.36[/TD]
[TD="align: right"]-2.01[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:15[/TD]
[TD]PJM[/TD]
[TD="align: right"]61847[/TD]
[TD="align: right"]32.72[/TD]
[TD="align: right"]0.36[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:15[/TD]
[TD]WEST[/TD]
[TD="align: right"]61752[/TD]
[TD="align: right"]30.81[/TD]
[TD="align: right"]-1.55[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:20[/TD]
[TD]CAPITL[/TD]
[TD="align: right"]61757[/TD]
[TD="align: right"]33.62[/TD]
[TD="align: right"]2.08[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:20[/TD]
[TD]CENTRL[/TD]
[TD="align: right"]61754[/TD]
[TD="align: right"]31.76[/TD]
[TD="align: right"]0.22[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:20[/TD]
[TD]DUNWOD[/TD]
[TD="align: right"]61760[/TD]
[TD="align: right"]34.88[/TD]
[TD="align: right"]3.34[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:20[/TD]
[TD]GENESE[/TD]
[TD="align: right"]61753[/TD]
[TD="align: right"]31.03[/TD]
[TD="align: right"]-0.51[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:20[/TD]
[TD]H Q[/TD]
[TD="align: right"]61844[/TD]
[TD="align: right"]30.75[/TD]
[TD="align: right"]-0.79[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:20[/TD]
[TD]HUD VL[/TD]
[TD="align: right"]61758[/TD]
[TD="align: right"]35.01[/TD]
[TD="align: right"]3.47[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:20[/TD]
[TD]LONGIL[/TD]
[TD="align: right"]61762[/TD]
[TD="align: right"]63.39[/TD]
[TD="align: right"]4.35[/TD]
[TD="align: right"]-27.5[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:20[/TD]
[TD]MHK VL[/TD]
[TD="align: right"]61756[/TD]
[TD="align: right"]32.48[/TD]
[TD="align: right"]0.95[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:20[/TD]
[TD]MILLWD[/TD]
[TD="align: right"]61759[/TD]
[TD="align: right"]34.88[/TD]
[TD="align: right"]3.34[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:20[/TD]
[TD]N.Y.C.[/TD]
[TD="align: right"]61761[/TD]
[TD="align: right"]45.26[/TD]
[TD="align: right"]3.56[/TD]
[TD="align: right"]-10.16[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:20[/TD]
[TD]NORTH[/TD]
[TD="align: right"]61755[/TD]
[TD="align: right"]30.56[/TD]
[TD="align: right"]-0.98[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:20[/TD]
[TD]NPX[/TD]
[TD="align: right"]61845[/TD]
[TD="align: right"]33.9[/TD]
[TD="align: right"]2.37[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:20[/TD]
[TD]O H[/TD]
[TD="align: right"]61846[/TD]
[TD="align: right"]29.74[/TD]
[TD="align: right"]-1.8[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:20[/TD]
[TD]PJM[/TD]
[TD="align: right"]61847[/TD]
[TD="align: right"]32.04[/TD]
[TD="align: right"]0.5[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:20[/TD]
[TD]WEST[/TD]
[TD="align: right"]61752[/TD]
[TD="align: right"]30.21[/TD]
[TD="align: right"]-1.32[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:25[/TD]
[TD]CAPITL[/TD]
[TD="align: right"]61757[/TD]
[TD="align: right"]33.47[/TD]
[TD="align: right"]2.01[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:25[/TD]
[TD]CENTRL[/TD]
[TD="align: right"]61754[/TD]
[TD="align: right"]31.77[/TD]
[TD="align: right"]0.31[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:25[/TD]
[TD]DUNWOD[/TD]
[TD="align: right"]61760[/TD]
[TD="align: right"]34.72[/TD]
[TD="align: right"]3.27[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:25[/TD]
[TD]GENESE[/TD]
[TD="align: right"]61753[/TD]
[TD="align: right"]31.08[/TD]
[TD="align: right"]-0.38[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:25[/TD]
[TD]H Q[/TD]
[TD="align: right"]61844[/TD]
[TD="align: right"]30.67[/TD]
[TD="align: right"]-0.79[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:25[/TD]
[TD]HUD VL[/TD]
[TD="align: right"]61758[/TD]
[TD="align: right"]34.88[/TD]
[TD="align: right"]3.43[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:25[/TD]
[TD]LONGIL[/TD]
[TD="align: right"]61762[/TD]
[TD="align: right"]63.23[/TD]
[TD="align: right"]4.24[/TD]
[TD="align: right"]-27.54[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:25[/TD]
[TD]MHK VL[/TD]
[TD="align: right"]61756[/TD]
[TD="align: right"]32.39[/TD]
[TD="align: right"]0.94[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:25[/TD]
[TD]MILLWD[/TD]
[TD="align: right"]61759[/TD]
[TD="align: right"]34.72[/TD]
[TD="align: right"]3.27[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:25[/TD]
[TD]N.Y.C.[/TD]
[TD="align: right"]61761[/TD]
[TD="align: right"]45.11[/TD]
[TD="align: right"]3.46[/TD]
[TD="align: right"]-10.2[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:25[/TD]
[TD]NORTH[/TD]
[TD="align: right"]61755[/TD]
[TD="align: right"]30.44[/TD]
[TD="align: right"]-1.01[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:25[/TD]
[TD]NPX[/TD]
[TD="align: right"]61845[/TD]
[TD="align: right"]33.75[/TD]
[TD="align: right"]2.29[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:25[/TD]
[TD]O H[/TD]
[TD="align: right"]61846[/TD]
[TD="align: right"]29.88[/TD]
[TD="align: right"]-1.57[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:25[/TD]
[TD]PJM[/TD]
[TD="align: right"]61847[/TD]
[TD="align: right"]32.05[/TD]
[TD="align: right"]0.6[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:25[/TD]
[TD]WEST[/TD]
[TD="align: right"]61752[/TD]
[TD="align: right"]30.38[/TD]
[TD="align: right"]-1.07[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:30[/TD]
[TD]CAPITL[/TD]
[TD="align: right"]61757[/TD]
[TD="align: right"]33.55[/TD]
[TD="align: right"]2.05[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:30[/TD]
[TD]CENTRL[/TD]
[TD="align: right"]61754[/TD]
[TD="align: right"]31.85[/TD]
[TD="align: right"]0.35[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:30[/TD]
[TD]DUNWOD[/TD]
[TD="align: right"]61760[/TD]
[TD="align: right"]34.75[/TD]
[TD="align: right"]3.25[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:30[/TD]
[TD]GENESE[/TD]
[TD="align: right"]61753[/TD]
[TD="align: right"]31.13[/TD]
[TD="align: right"]-0.38[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:30[/TD]
[TD]H Q[/TD]
[TD="align: right"]61844[/TD]
[TD="align: right"]30.69[/TD]
[TD="align: right"]-0.82[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:30[/TD]
[TD]HUD VL[/TD]
[TD="align: right"]61758[/TD]
[TD="align: right"]34.91[/TD]
[TD="align: right"]3.4[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:30[/TD]
[TD]LONGIL[/TD]
[TD="align: right"]61762[/TD]
[TD="align: right"]63.34[/TD]
[TD="align: right"]4.32[/TD]
[TD="align: right"]-27.52[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:30[/TD]
[TD]MHK VL[/TD]
[TD="align: right"]61756[/TD]
[TD="align: right"]32.48[/TD]
[TD="align: right"]0.98[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:30[/TD]
[TD]MILLWD[/TD]
[TD="align: right"]61759[/TD]
[TD="align: right"]34.78[/TD]
[TD="align: right"]3.28[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:30[/TD]
[TD]N.Y.C.[/TD]
[TD="align: right"]61761[/TD]
[TD="align: right"]45.17[/TD]
[TD="align: right"]3.47[/TD]
[TD="align: right"]-10.2[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:30[/TD]
[TD]NORTH[/TD]
[TD="align: right"]61755[/TD]
[TD="align: right"]30.47[/TD]
[TD="align: right"]-1.04[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:30[/TD]
[TD]NPX[/TD]
[TD="align: right"]61845[/TD]
[TD="align: right"]33.8[/TD]
[TD="align: right"]2.3[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:30[/TD]
[TD]O H[/TD]
[TD="align: right"]61846[/TD]
[TD="align: right"]29.96[/TD]
[TD="align: right"]-1.54[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:30[/TD]
[TD]PJM[/TD]
[TD="align: right"]61847[/TD]
[TD="align: right"]32.13[/TD]
[TD="align: right"]0.63[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:30[/TD]
[TD]WEST[/TD]
[TD="align: right"]61752[/TD]
[TD="align: right"]30.43[/TD]
[TD="align: right"]-1.07[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:35[/TD]
[TD]CAPITL[/TD]
[TD="align: right"]61757[/TD]
[TD="align: right"]33.6[/TD]
[TD="align: right"]2.02[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:35[/TD]
[TD]CENTRL[/TD]
[TD="align: right"]61754[/TD]
[TD="align: right"]31.99[/TD]
[TD="align: right"]0.41[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:35[/TD]
[TD]DUNWOD[/TD]
[TD="align: right"]61760[/TD]
[TD="align: right"]34.83[/TD]
[TD="align: right"]3.25[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:35[/TD]
[TD]GENESE[/TD]
[TD="align: right"]61753[/TD]
[TD="align: right"]31.23[/TD]
[TD="align: right"]-0.35[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:35[/TD]
[TD]H Q[/TD]
[TD="align: right"]61844[/TD]
[TD="align: right"]30.76[/TD]
[TD="align: right"]-0.82[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:35[/TD]
[TD]HUD VL[/TD]
[TD="align: right"]61758[/TD]
[TD="align: right"]34.99[/TD]
[TD="align: right"]3.41[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:35[/TD]
[TD]LONGIL[/TD]
[TD="align: right"]61762[/TD]
[TD="align: right"]35.75[/TD]
[TD="align: right"]4.17[/TD]
[TD="align: right"]-0.01[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:35[/TD]
[TD]MHK VL[/TD]
[TD="align: right"]61756[/TD]
[TD="align: right"]32.56[/TD]
[TD="align: right"]0.98[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:35[/TD]
[TD]MILLWD[/TD]
[TD="align: right"]61759[/TD]
[TD="align: right"]34.83[/TD]
[TD="align: right"]3.25[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:35[/TD]
[TD]N.Y.C.[/TD]
[TD="align: right"]61761[/TD]
[TD="align: right"]45.2[/TD]
[TD="align: right"]3.44[/TD]
[TD="align: right"]-10.18[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:35[/TD]
[TD]NORTH[/TD]
[TD="align: right"]61755[/TD]
[TD="align: right"]30.5[/TD]
[TD="align: right"]-1.07[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:35[/TD]
[TD]NPX[/TD]
[TD="align: right"]61845[/TD]
[TD="align: right"]33.88[/TD]
[TD="align: right"]2.3[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:35[/TD]
[TD]O H[/TD]
[TD="align: right"]61846[/TD]
[TD="align: right"]30.13[/TD]
[TD="align: right"]-1.45[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:35[/TD]
[TD]PJM[/TD]
[TD="align: right"]61847[/TD]
[TD="align: right"]32.24[/TD]
[TD="align: right"]0.66[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2013 0:35[/TD]
[TD]WEST[/TD]
[TD="align: right"]61752[/TD]
[TD="align: right"]30.6[/TD]
[TD="align: right"]-0.98[/TD]
[TD="align: right"]0[/TD]
[/TR]
</tbody>[/TABLE]
As u can see above is the sample data. I just want the data of the capital city to be copied at the interval of an hour rather than 5 min.
 
Upvote 0
So you want to copy only the values from Sheet1 where column A is an exact hour (i.e. 1:00, 2:00) and ignore the other values like 1:05, 2:05, etc. ?
 
Upvote 0
Code:
Sub copyHours()

With Sheets("Sheet1")
Dim lastRow As Long, theMinute As Integer, nextBlank As Long, myLoop As Long
    lastRow = .Range("A" & Rows.Count).End(xlUp).Row

For myLoop = 2 To lastRow
    nextBlank = Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1).Row
    If Minute(.Cells(myLoop, 1).Value) = 0 Then
        .Range(.Cells(myLoop, 1), .Cells(myLoop, 6)).Copy _
            Sheets("Sheet2").Range("A" & nextBlank)
    End If
Next myLoop

End With
End Sub
 
Upvote 0
Thank you Sir.
It works Fine.
Only the issue is the data i want is only of the Capitl City. From the code u have given copies the data at hourly basis of all the cities.
 
Upvote 0
So you only want the ones where the city name is "CAPITL" ? Try this:

Code:
Sub copyHours()

With Sheets("Sheet1")
Dim lastRow As Long, theMinute As Integer, nextBlank As Long, myLoop As Long
    lastRow = .Range("A" & Rows.Count).End(xlUp).Row

For myLoop = 2 To lastRow
    nextBlank = Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1).Row
    If Minute(.Cells(myLoop, 1).Value) = 0 And .Cells(myLoop, 2).Value = "CAPITL" Then
        .Range(.Cells(myLoop, 1), .Cells(myLoop, 6)).Copy _
            Sheets("Sheet2").Range("A" & nextBlank)
    End If
Next myLoop

End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,126
Members
452,381
Latest member
Nova88

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