Dear all,
Could anyone help me with below problem.
I am looking for VBA code to extract data from each tab into master tab based on data.
I have 3 tabs (inputs)
Tab1 (Dept A-NAME) (RANGE B4:I7)
[TABLE="width: 544"]
<tbody>[TR]
[TD]SL NO[/TD]
[TD]ID[/TD]
[TD]Date[/TD]
[TD]Customer[/TD]
[TD]Start Time[/TD]
[TD]End Time[/TD]
[TD]Trucks[/TD]
[TD]Supervisor[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]A[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 1[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD]ABC[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]A[/TD]
[TD="align: right"]2/24/2014[/TD]
[TD]Customer 2[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]5[/TD]
[TD]CDE[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]A[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 3[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]2[/TD]
[TD]FGK[/TD]
[/TR]
</tbody>[/TABLE]
Tab 2 (Dept B-NAME) (RANGE B4:I11)
[TABLE="width: 564"]
<tbody>[TR]
[TD]SL NO[/TD]
[TD]ID[/TD]
[TD]Date[/TD]
[TD]Customer[/TD]
[TD]Start Time[/TD]
[TD]End Time[/TD]
[TD]Trucks[/TD]
[TD]Supervisor[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]B[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 3[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD]RTY[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]B[/TD]
[TD="align: right"]2/24/2014[/TD]
[TD]Customer 1[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]5[/TD]
[TD]CDE[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]B[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 2[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]2[/TD]
[TD]FGK[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]B[/TD]
[TD="align: right"]2/19/2014[/TD]
[TD]Customer 3[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD]CCC[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]B[/TD]
[TD="align: right"]2/19/2014[/TD]
[TD]Customer 4[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]5[/TD]
[TD]DDD[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]B[/TD]
[TD="align: right"]2/19/2014[/TD]
[TD]Customer 5[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]1[/TD]
[TD]ABC[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]B[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 6[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1.3[/TD]
[TD="align: right"]4[/TD]
[TD]MMM[/TD]
[/TR]
</tbody>[/TABLE]
Tab 3 (Dept C-NAME) (RANGE B4:I7)
Is it possible to run vba code to get below result in new tab
[TABLE="width: 529"]
<tbody>[TR]
[TD]SL NO[/TD]
[TD]ID[/TD]
[TD]Date[/TD]
[TD]Customer[/TD]
[TD]Start Time[/TD]
[TD]End Time[/TD]
[TD]Trucks[/TD]
[TD]Supervisor[/TD]
[TD]Result[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]A[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 1[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD]ABC[/TD]
[TD]Dept A[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]A[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 3[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]2[/TD]
[TD]FGK[/TD]
[TD]Dept A[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]B[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 3[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD]RTY[/TD]
[TD]Dept B[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]B[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 2[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]2[/TD]
[TD]FGK[/TD]
[TD]Dept B[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]B[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 6[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1.3[/TD]
[TD="align: right"]4[/TD]
[TD]MMM[/TD]
[TD]Dept B[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]C[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 8[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD]QWE[/TD]
[TD]Dept C[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]C[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 3[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[TD]FGK[/TD]
[TD]Dept C[/TD]
[/TR]
</tbody>[/TABLE]
Condition here is date 2/25/2014, is possible when running code message box pops up to ask date, when we give conditional date it extracts those dates.
Execel -2007 & Windows 7
Thanks,
Giri
Could anyone help me with below problem.
I am looking for VBA code to extract data from each tab into master tab based on data.
I have 3 tabs (inputs)
Tab1 (Dept A-NAME) (RANGE B4:I7)
[TABLE="width: 544"]
<tbody>[TR]
[TD]SL NO[/TD]
[TD]ID[/TD]
[TD]Date[/TD]
[TD]Customer[/TD]
[TD]Start Time[/TD]
[TD]End Time[/TD]
[TD]Trucks[/TD]
[TD]Supervisor[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]A[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 1[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD]ABC[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]A[/TD]
[TD="align: right"]2/24/2014[/TD]
[TD]Customer 2[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]5[/TD]
[TD]CDE[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]A[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 3[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]2[/TD]
[TD]FGK[/TD]
[/TR]
</tbody>[/TABLE]
Tab 2 (Dept B-NAME) (RANGE B4:I11)
[TABLE="width: 564"]
<tbody>[TR]
[TD]SL NO[/TD]
[TD]ID[/TD]
[TD]Date[/TD]
[TD]Customer[/TD]
[TD]Start Time[/TD]
[TD]End Time[/TD]
[TD]Trucks[/TD]
[TD]Supervisor[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]B[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 3[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD]RTY[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]B[/TD]
[TD="align: right"]2/24/2014[/TD]
[TD]Customer 1[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]5[/TD]
[TD]CDE[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]B[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 2[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]2[/TD]
[TD]FGK[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]B[/TD]
[TD="align: right"]2/19/2014[/TD]
[TD]Customer 3[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD]CCC[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]B[/TD]
[TD="align: right"]2/19/2014[/TD]
[TD]Customer 4[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]5[/TD]
[TD]DDD[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]B[/TD]
[TD="align: right"]2/19/2014[/TD]
[TD]Customer 5[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]1[/TD]
[TD]ABC[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]B[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 6[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1.3[/TD]
[TD="align: right"]4[/TD]
[TD]MMM[/TD]
[/TR]
</tbody>[/TABLE]
Tab 3 (Dept C-NAME) (RANGE B4:I7)
Is it possible to run vba code to get below result in new tab
[TABLE="width: 529"]
<tbody>[TR]
[TD]SL NO[/TD]
[TD]ID[/TD]
[TD]Date[/TD]
[TD]Customer[/TD]
[TD]Start Time[/TD]
[TD]End Time[/TD]
[TD]Trucks[/TD]
[TD]Supervisor[/TD]
[TD]Result[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]A[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 1[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD]ABC[/TD]
[TD]Dept A[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]A[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 3[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]2[/TD]
[TD]FGK[/TD]
[TD]Dept A[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]B[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 3[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD]RTY[/TD]
[TD]Dept B[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]B[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 2[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]2[/TD]
[TD]FGK[/TD]
[TD]Dept B[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]B[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 6[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1.3[/TD]
[TD="align: right"]4[/TD]
[TD]MMM[/TD]
[TD]Dept B[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]C[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 8[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD]QWE[/TD]
[TD]Dept C[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]C[/TD]
[TD="align: right"]2/25/2014[/TD]
[TD]Customer 3[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[TD]FGK[/TD]
[TD]Dept C[/TD]
[/TR]
</tbody>[/TABLE]
Condition here is date 2/25/2014, is possible when running code message box pops up to ask date, when we give conditional date it extracts those dates.
Execel -2007 & Windows 7
Thanks,
Giri