Good evening all,
I have done a bit of VBA coding in the past but not had any formal training. I have had success from adapting other code I found and lots of trial and error!
I am trying to find a bit of code that will copy data from 2 cells but only if a criteria is met in another cell. So basically, when I select "closed" from column E, I want Serial No & Part No to be copied to the other sheet. My table will have rows added to it over time so needs to be dynamic. Hopefully the screenshots will help clarify.
Any help is really appreciated. I can't seem to figure this out at all.
Data sheet:-
Completed Labels Sheet:-
I have done a bit of VBA coding in the past but not had any formal training. I have had success from adapting other code I found and lots of trial and error!
I am trying to find a bit of code that will copy data from 2 cells but only if a criteria is met in another cell. So basically, when I select "closed" from column E, I want Serial No & Part No to be copied to the other sheet. My table will have rows added to it over time so needs to be dynamic. Hopefully the screenshots will help clarify.
Any help is really appreciated. I can't seem to figure this out at all.
Data sheet:-
dynamic copy of specific cells.xlsm | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | Serial No | Description | Part number | ordered | complete? | |||||||
2 | 001 | fairing | A1234 | YES | ||||||||
3 | 002 | access cover | B1234 | NO | When closed is selected from the drop down in column E I want VBA code to copy "Serial No' & "Part No"of that line to "completed Labels" sheet in the respective boxes. | |||||||
4 | 003 | drain | C1234 | YES | ||||||||
5 | 004 | cover | D1234 | YES | ||||||||
6 | ||||||||||||
7 | ||||||||||||
8 | ||||||||||||
9 | ||||||||||||
10 | ||||||||||||
11 | ||||||||||||
12 | ||||||||||||
Data |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
E2:E5 | List | closed, open |
Completed Labels Sheet:-
dynamic copy of specific cells.xlsm | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | ||||||||
2 | DELIVER TO LOGISTICS | |||||||
3 | Serial No | I | ||||||
4 | Part no | |||||||
5 | ||||||||
Completed Labels |