rjplante
Well-known Member
- Joined
- Oct 31, 2008
- Messages
- 566
- Office Version
- 365
- Platform
- Windows
I have a item list on one worksheet (wsA) and the first column is used to generate a named range "Master List" which is used in a pick form (wsB). The user will either select from the dropdown menu (column A) and then enter a quantity (column B). The item cost (column C) uses a vlookup formula to find the price from the table in wsA. There are some occasions where the user will type in a value in column A (wsB) that is not in the table on wsA. This will generate an #N/A value in column C because the price for the new item does not appear in the table in wsA. Is there a way to add a watch to column C for the value/result of "#N/A" and then run a macro to highlight the value in column A and delete the vlookup formula in column C, highlight column C and unlock the cell allowing the user to enter in their own price? Would I simply add in an error handler to the watch code so that if an error occurred in the formula, the result would be to call a formatting macro? I am not quite sure how to proceed.
Thanks for the feedback, any direction would help.
Thanks for the feedback, any direction would help.