Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Creating an IF/VLOOKUP formula involving an Active-x combobox I am trying to cre

ID: 3565671 • Letter: C

Question

Creating an IF/VLOOKUP formula involving an Active-x combobox

I am trying to create a formula involving an Active-X combo box titled "LossCauseCode"", and using two data ranges. The main worksheet, titled "New Loss", where the combo box exists uses data from range A2:A154 on another worksheet titled "Values". I need cell H8 on "New Loss" to auto-populate the corresponding descriptions from data range B2:B154 on ""Values"". For example on "Values" cell A2 = 20 and the corresponding description in cell B2 = GL-Prem/Op BI. I believe this requires a VBA formula. Hope this makes sense...

Explanation / Answer

I forgot to manage that exception. Just circle the formula with an IFERROR function. This gives:

=IFERROR(VLOOKUP(((VALUE(ComboLossCauseCodeLinkedCell),Values!A2:B154,2,FALSE),"")))

Note that this IFERROR isn't necessarily relevant as it hides an error if the VLOOKUP function fails. This is different than not looking for a value. Unfortunately as you went for a combobox vs. a listbox as I suggested initially there is no other way -- that I know of -- to manage that exception.

Hope this helpss

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote