SOLVED

vba SelectionChange based on the cell value on the column

Copper Contributor

Hello community!

 

I have a spreadsheet that contains multiple data and each line on the raw (item code) have drawings / work instructions that are located on different excel sheets. The work instructions are located onto 5 different workbooks - matrix (for all 5 production lines) and can't be combined into one.

 

Screenshot 2022-10-31 2203487.jpg

 

Screenshot 2022-10-31 2210308.jpgI have made hyperlink function that when you will click on the drawing cell (under column K) to open the required excel workbook (Matrix) and I have made vba Selection Change code that will copy the value that is selected and paste the value into the work instruction spreadsheet, so will give the user correct data for the selected item code.

 Screenshot 2022-10-31 225617.jpgThe issue is that this vba code will paste the selected value onto only one workbook (example here if only drawing from Hazardous - Linear (prod. line - under column J) is selected, will paste the value on "LINEAR....xlsx"), but not if it's selected some drawing from other prod. line. - The correct matrix will be opened but will not paste the value.

Can somebody please help me how this vba code can be modify so the selected cell value be copied and pasted on the workbook based on the cell value under the column J. - 5 variable - 5 different workbooks.

 

Thank you,

Nik

1 Reply
best response confirmed by NSrebro (Copper Contributor)
Solution
Hi, can anybody help me with the above please? Do I need to provide more details?
1 best response

Accepted Solutions
best response confirmed by NSrebro (Copper Contributor)
Solution
Hi, can anybody help me with the above please? Do I need to provide more details?

View solution in original post