MrExcel Message Board


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Mar 18th, 2002, 07:30 AM   #1
Jim Theisen
 
Join Date: Mar 2002
Posts: 3
Default

I have two columns on a spreadsheet, Column 'A' is for a name and column 'B' is for a number. Each name has a corresponding number which I have to look up everytime I type in a name into column 'A'. I want to be able to type a specific name into column 'A' and have the corresponding number automatically insert itself into column 'B' next to the name. Can anyone help me with this?

[ This Message was edited by: Jim Theisen on 2002-03-18 02:30 ]
Jim Theisen is offline   Reply With Quote
Old Mar 18th, 2002, 07:44 AM   #2
Dave Hawley
Banned
 
Join Date: Mar 2002
Posts: 1,582
Default

Hi Jim

I assume you want a Worksheet Function for this. I also assume your numbers are names in Column A and B are in a different sheet to the name you enter into Column "A"

In Column B of the Lookup sheet put:
=VLOOKUP(A1,Sheet1!A1:B1000,2,FALSE)


I think you may also be interested in this very user friedly method I have for this here: http://www.ozgrid.com/download/default.htm
Under: "Lookup.zip"



Dave Hawley is offline   Reply With Quote
Old Mar 18th, 2002, 07:52 AM   #3
Derek
 
Join Date: Feb 2002
Location: Perth Australia
Posts: 1,564
Default

Hi

If all names you need are already in Column A, then, assuming your last entry in column B is in row 19, put this formula in B20 under your last entry and scroll down
=VLOOKUP(A20,A:B,2,FALSE)
Change A20 to suite your actual row.

regards
Derek
Derek is offline   Reply With Quote
Old Mar 19th, 2002, 04:39 PM   #4
Chris Davison
MrExcel MVP
 
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
Default

Quote:
On 2002-03-18 02:44, Dave Hawley wrote:
Hi Jim

I assume you want a Worksheet Function for this. I also assume your numbers are names in Column A and B are in a different sheet to the name you enter into Column "A"

In Column B of the Lookup sheet put:
=VLOOKUP(A1,Sheet1!A1:B1000,2,FALSE)


I think you may also be interested in this very user friedly method I have for this here: http://www.ozgrid.com/download/default.htm
Under: "Lookup.zip"
Dave,

don't you need to anchor that range if you're "putting" it in ?

I know it anchors automatically if you're doing it with the mouse, but not if you're just typing it

(caught myself out many times with that !)

Chris


Chris Davison is offline   Reply With Quote
Old Mar 19th, 2002, 09:21 PM   #5
Jack in the UK
 
Join Date: Feb 2002
Posts: 3,063
Default

Chris

BTW worth remember anchor only if dragging else worthless, as you say mouse does thsi auto.

Also anchor only as you need that is is drag by rows anchor columns only and v's'v else it goes pear shaped.

Funnyhow it works, also woth eremembering one Vlookup i thinng is not a formula but combine 3 will remove them n/a and so on. I know these are important but to me blanks are professional and to acheive this 3 vlookup with if are reuired.

Just some points..

Anchor as needed not carte blanc!
__________________
Free Excel based Web Toolbar available here.

Jack in the UK
J & R Excel Solutions
"making Excel work for you"
Jack in the UK is offline   Reply With Quote
Old Mar 19th, 2002, 10:37 PM   #6
Dave Hawley
Banned
 
Join Date: Mar 2002
Posts: 1,582
Default

Hi Guys


Your right it should be "anchored". That's what happens when you type straight in the message board I guess. I am just so used to having any ranges named (normally dynamic) that I often forget this.


Dave Hawley is offline   Reply With Quote
Old Mar 20th, 2002, 12:53 AM   #7
Juan Pablo González
MrExcel MVP
 
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,758
Default

Just one more suggestion...

You can replace the FALSE with a 0 (To avoid 4 extra types... )

=VLOOKUP(A1,Sheet1!$A$1:$B$1000,2,0)

I think it looks nicer too !
__________________
Regards,

Juan Pablo González
http://www.juanpg.com
Juan Pablo González is offline   Reply With Quote
Old Mar 20th, 2002, 06:14 AM   #8
Dave Hawley
Banned
 
Join Date: Mar 2002
Posts: 1,582
Default

Hmm, I don't agree with the use of zeros in place of False, or any number in place of True. It can makes a spreadsheet very hard to trouble-shoot and is asking for trouble if you use Edit>Replace on zeros!. There is no benefit in using zero over False (other than 4 less key strokes) but shorter can often mean less efficient.

JMHO
Dave Hawley is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +1. The time now is 12:42 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes