Sorry this is a long one. (You could jump to Question 1 but the Background info may help to understand what I am trying to achieve).
BACKGROUND:
I have a workbook which is data-connected to files from another program (I'll call this DATA WORKBOOK from now on). On a certain sheet, I have a list of employer names in Column B. In Column A I have a list of ID numbers (which are used to refer to an employer). I can't change the column order of this sheet as the data is connected to an external source and I don't want to risk compromising the data.
I am currently creating a form in another workbook (for sake of reference I'll call this PROJECT WORKBOOK). This form has code which looks up the Employer names in DATA WORKBOOK, and uses that to fill a list box.
Now for the problem. I need to somehow use the employer name (selected by the end user in the form in PROJECT WORKBOOK) to obtain the matching employer ID from DATA WORKBOOK.
But how do I do it?
QUESTION 1:
I was thinking of using a VLOOKUP on the closed DATA WORKBOOK. But AFAIK it is impossible to VLOOKUP when the matching data is not in the left most column. Unless someone knows otherwise? (i.e. I would have to return a value from Column A where the listbox.value matches data in Column B).
QUESTION 2:
Would it be possible to create an array from the DATA WORKBOOK, switch the columns in the array and then vlookup the array instead?
Bookmarks