Please help me out. I want a vba that can automate this process that copy sheet2 to sheet1. For example on sheet2. Column D4 fruit column separate by a blank line with a new fruit with dates, purchase orders and quantity. There's six types of fruit that I need to keep track. What I want to do is to copy fruit types on column D all rows that are "apple" and copy data on column A,B and C and paste it to sheet1 on A9,B9 and C9 for Apple and D9,E9 and F9 for banana and so on. I'm sorry I'm trying to explain as best as I can.
Thank you very much.
A9 will always be apple
D9 will always be banana
G9 will always be grapes
example below
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD][/TD]
[TD]a[/TD]
[TD]b[/TD]
[TD]c[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]date[/TD]
[TD]PO[/TD]
[TD]qty[/TD]
[TD]date[/TD]
[TD]PO[/TD]
[TD]qty[/TD]
[TD]date[/TD]
[TD]PO[/TD]
[TD]qty[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]3/18/2019[/TD]
[TD]25[/TD]
[TD]5789[/TD]
[TD]4/21/2019[/TD]
[TD]18[/TD]
[TD]3009[/TD]
[TD]4/25/2019[/TD]
[TD]12[/TD]
[TD]28[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]3/23/2019[/TD]
[TD] 60[/TD]
[TD]6090[/TD]
[TD]4/24/2019[/TD]
[TD]39[/TD]
[TD]5881[/TD]
[TD]4/28/2019[/TD]
[TD]99[/TD]
[TD]64[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Sheet1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]date[/TD]
[TD]PO[/TD]
[TD]Qty[/TD]
[TD]Fruit[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]3/18/2019[/TD]
[TD]25[/TD]
[TD]5789[/TD]
[TD]Apple[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]3/23/2019[/TD]
[TD]60[/TD]
[TD]6090[/TD]
[TD]Apple[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]3/28/2019[/TD]
[TD]30[/TD]
[TD]3098[/TD]
[TD]Apple[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]4/21/2019[/TD]
[TD]18[/TD]
[TD]3009[/TD]
[TD]Banana[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]4/24/2019[/TD]
[TD]39[/TD]
[TD]5881[/TD]
[TD]Banana[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]4/24/2019[/TD]
[TD]68[/TD]
[TD]3068[/TD]
[TD]Banana[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]4/25/2019[/TD]
[TD]12[/TD]
[TD]28[/TD]
[TD]Grapes[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]4/28/2019[/TD]
[TD]99[/TD]
[TD]64[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Sheet2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
****** id="cke_pastebin" style="position: absolute; top: 312px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">[TABLE="width: 500"]
<tbody>[TR]
[TD]4/28/2019[/TD]
[/TR]
</tbody>[/TABLE]
Thank you very much.
A9 will always be apple
D9 will always be banana
G9 will always be grapes
example below
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD][/TD]
[TD]a[/TD]
[TD]b[/TD]
[TD]c[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]date[/TD]
[TD]PO[/TD]
[TD]qty[/TD]
[TD]date[/TD]
[TD]PO[/TD]
[TD]qty[/TD]
[TD]date[/TD]
[TD]PO[/TD]
[TD]qty[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]3/18/2019[/TD]
[TD]25[/TD]
[TD]5789[/TD]
[TD]4/21/2019[/TD]
[TD]18[/TD]
[TD]3009[/TD]
[TD]4/25/2019[/TD]
[TD]12[/TD]
[TD]28[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]3/23/2019[/TD]
[TD] 60[/TD]
[TD]6090[/TD]
[TD]4/24/2019[/TD]
[TD]39[/TD]
[TD]5881[/TD]
[TD]4/28/2019[/TD]
[TD]99[/TD]
[TD]64[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Sheet1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]date[/TD]
[TD]PO[/TD]
[TD]Qty[/TD]
[TD]Fruit[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]3/18/2019[/TD]
[TD]25[/TD]
[TD]5789[/TD]
[TD]Apple[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]3/23/2019[/TD]
[TD]60[/TD]
[TD]6090[/TD]
[TD]Apple[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]3/28/2019[/TD]
[TD]30[/TD]
[TD]3098[/TD]
[TD]Apple[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]4/21/2019[/TD]
[TD]18[/TD]
[TD]3009[/TD]
[TD]Banana[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]4/24/2019[/TD]
[TD]39[/TD]
[TD]5881[/TD]
[TD]Banana[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]4/24/2019[/TD]
[TD]68[/TD]
[TD]3068[/TD]
[TD]Banana[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]4/25/2019[/TD]
[TD]12[/TD]
[TD]28[/TD]
[TD]Grapes[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]4/28/2019[/TD]
[TD]99[/TD]
[TD]64[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Sheet2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
****** id="cke_pastebin" style="position: absolute; top: 312px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">[TABLE="width: 500"]
<tbody>[TR]
[TD]4/28/2019[/TD]
[/TR]
</tbody>[/TABLE]