mpmcarthur
New Member
- Joined
- Oct 1, 2012
- Messages
- 9
Need help with an Excel macro related to cell comments. I have a workbook with two worksheets. Sheet2 is where I input master data into a table. On Sheet1, I use formulas (mostly vlookup) to present Sheet2 data into a specific format. Overly simplified, this is the format of the two worksheets:
Sheet2 Columns (this is where the list of inventory is entered in a table):
A Stock #
B Make
C Model
D Comment
Sheet1 Columns(this is where the user selects a stock number from a dropdown):
A Stock #
Desired result:
Let's say the user is on Sheet1 cell A2 and selects a stock # from the dropdown (the dropdown list sources from Sheet 2 column A). The macro would identify the selected stock # on Sheet1 cell A2 and then perform a lookup of that stock # on Sheet2. Let's say the lookup locates the matching stock # on Sheet 2 on row 11 (cell A11). Then, the macro would refer to cell D11 to retrieve the comment value related to that stock # and enter it as a comment back on cell A2 on Sheet1. The trigger that causes the macro to run should be anytime there is a change on Sheet2. I know that may sound odd, but keep in mind I've oversimplified how the real workbook actually works in order to minimize the noise in my request for help. When the macro is triggered because of a change on Sheet2, it should run on Sheet1 and "refresh" the comment lookup for all of Col A.
Hope that makes sense. I sincerely appreciate any help offered.
Sheet2 Columns (this is where the list of inventory is entered in a table):
A Stock #
B Make
C Model
D Comment
Sheet1 Columns(this is where the user selects a stock number from a dropdown):
A Stock #
Desired result:
Let's say the user is on Sheet1 cell A2 and selects a stock # from the dropdown (the dropdown list sources from Sheet 2 column A). The macro would identify the selected stock # on Sheet1 cell A2 and then perform a lookup of that stock # on Sheet2. Let's say the lookup locates the matching stock # on Sheet 2 on row 11 (cell A11). Then, the macro would refer to cell D11 to retrieve the comment value related to that stock # and enter it as a comment back on cell A2 on Sheet1. The trigger that causes the macro to run should be anytime there is a change on Sheet2. I know that may sound odd, but keep in mind I've oversimplified how the real workbook actually works in order to minimize the noise in my request for help. When the macro is triggered because of a change on Sheet2, it should run on Sheet1 and "refresh" the comment lookup for all of Col A.
Hope that makes sense. I sincerely appreciate any help offered.