• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VlookUp problem with a Combobox and Cell Stored as Text

Iain A

New Member
Hi any help would be appreciated, I am attempting to use a Vlookup from the value in a combobox with a linked cell the cell keeps storing the value as text but to get the Vlookup to work I have to manually convert the cell to a number, I have tried this both in the formula bar and vba:

Formula

Code:
=IFERROR(VLOOKUP(K4,Departments!A:C,3),"Department Code")

vba

Code:
Private Sub cboDeptNum_Change()
Range("F11").Value = Application.VLookup(Me.cboDeptNum.Value, Sheets("Departments").Range("A:C"), 2, "Department Title")
End Sub
 

Attachments

  • Example - vbaVlookUP.xlsm
    27.4 KB · Views: 2
Hi,

See attached file and check if it is OK ?

Regards
Bosco
 

Attachments

  • Example - vbaVlookUP(1).xlsm
    26.7 KB · Views: 7
Last edited:
Back
Top