Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a cell X where the user can enter a number. I then need to take that number N and get the value of another cell Y based on that.

The scenario is this:

The user can enter a product number and then I want a text description to be filled out next to the product number. So I need the value mapped to a field next to the product list, on the same sheet.

How can I achieve this?

share|improve this question
It seems you wanted a solution for Microsoft Excel (which is not the sole spreadsheet application), so I added that tag. If this was incorrect of me I apologize, and I'll remove it if notified (or leave it free to anyone else to remove it). – Daniel Andersson May 24 '12 at 10:01
Actually Open Office in this case. – TheRestaurantOwner May 25 '12 at 17:19
Ok, re-tagging. – Daniel Andersson May 25 '12 at 19:02
up vote 2 down vote accepted

I think what your looking for is the vlookup function. I've created a mockup of the scenario you spoke of in your question, I have a simple table in sheet 2:

ID      Description
1       This is part 1
2       This is part 2
3       This is part 3
4       This is part 4
5       This is part 5

So on sheet 1, we can use the vlookup function to gather data from this table:

Enter Lookup Value ::       3               

Description::   This is part 3  

We enter the lookup value as shown above, in your case this would be N. In the cell where your description will be shown, you enter the vlookup formula. Locate the cell, click on the 'Insert Function' button and select vlookup. The formula you end up with looks something like this:


Where (Sheet1!c1) is the location of the lookup value, Sheet2!A2:C6 is the data range, 2 is your description column and false is the range lookup but this can be left blank most of the time.

If you take a look at this very good article it explains everything in more detail:

Hope this helps!

share|improve this answer
Thank you; I will see if it works for me too:=) – TheRestaurantOwner May 23 '12 at 18:33
Nice :) let me know how it goes.. – Dean May 24 '12 at 8:46
It works, thanks – TheRestaurantOwner May 25 '12 at 19:00
Would be nice if you could mark this as the answer :) – Dean May 26 '12 at 11:10
Sorry for the wait. Now it's marked as an answer. Thanks for the help :-) – TheRestaurantOwner Jun 2 '12 at 18:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .