VBA Copy and Paste specific cells based on criteria to other cells based on different criteria

Excellearn56

New Member
Joined
Nov 21, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have a data set in sheet 1. In column D there is an ID number, and associated name in column E (highlighted yellow). I would like to create a VBA code to copy this ID and name into column T and U for the associated PO number in column A, up to the next blank cell in column A, then select the next ID number from column D and associated name in column E, and copy those into column T and U for their associated PO number in column A. Repeat this process until there is no more IDs.

I have attached an image of example data set and layout of the sheet.

Thank you!
 

Attachments

  • Capture1.PNG
    Capture1.PNG
    46.9 KB · Views: 5

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,071
Latest member
cdnMech

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