Quick Excel question ?

Soldato
Joined
18 Oct 2002
Posts
10,078
Location
At home
Hi,

I got a fairly simple spreadsheet with machine number in column A and user in column B

A B
P01 Joe Bloggs
P02 Jane doe

Now I want a simple box where someone can type in P01 and it shows a result of the username.

Is that possible and easy to do ?

Thanks.
 
Easy:

=VLOOKUP(B4,A1:B2,2)

Where B4 is the cell used for the search data, A1:B2 is the table range and 2 is the column to get the data from. Put the formula in another cell (this is where the result will appear).

If you want an actual popup dialog then you will need to make use of VBA which makes things a bit more complex.

excel002.png
 
Last edited:
You can also use the FALSE parameter eg: =VLOOKUP(G2,A:B,2,FALSE)
Which will return a #N/A if the seek value isn't found.
Please also bear in mind that your seek column (machine number) needs to be in an ascending order.
 
Back
Top Bottom