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 May 6th, 2002, 06:34 AM   #1
RisingPhoenix
New Member
 
Join Date: May 2002
Posts: 3
Default

The formula Lookup keeps returning the cell value in the row above the one that I want.
Does anyone know how to fix it?

Regards
RisingPhoenix is offline   Reply With Quote
Old May 6th, 2002, 06:49 AM   #2
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-05-06 05:34, RisingPhoenix wrote:
The formula Lookup keeps returning the cell value in the row above the one that I want.
Does anyone know how to fix it?

Regards
Care to post the formula that you use along with what you want it to do?
Aladin Akyurek is offline   Reply With Quote
Old May 6th, 2002, 06:51 AM   #3
Dave Patton
Board Regular
 
Join Date: Feb 2002
Location: Calgary, Alberta Canada
Posts: 2,065
Default


Could you show your formula?

For an exact match, include the fourth parameter "false" or "0".

VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)

If you do not require an exact match (the fourth parameter is "true"), ensure that the table_array is sorted.
Dave Patton is offline   Reply With Quote
Old May 6th, 2002, 06:59 AM   #4
RisingPhoenix
New Member
 
Join Date: May 2002
Posts: 3
Default

This is what I'm trying to do.
I have a list extracted from a database contaning username and logonscrip for 5 different domains (file A). I also have a list for every usernamn in a single domain(file B). I need a function to match the username from file B with the properties from file A.

Ex from file A
Testuser:T-domain:logon.bat

The fomula is =LOOKUP(A3;'User&logon'!A:A)

Can you help me?
Regards



[ This Message was edited by: RisingPhoenix on 2002-05-06 06:02 ]
RisingPhoenix is offline   Reply With Quote
Old May 6th, 2002, 07:33 AM   #5
Dave Patton
Board Regular
 
Join Date: Feb 2002
Location: Calgary, Alberta Canada
Posts: 2,065
Default



With Lookup, the information must be sorted.
complete the syntax for Lookup.
Did you specify what column of information to return?

With Vlookup, you can specify the column etc.

try the complete syntax for Vlookup.
See above and Help.

- specify column to lookup
- specify if you want an exact match "False"
- specify actual range of information

Please advise if lets the formula give correct answers.

[ This Message was edited by: Dave Patton on 2002-05-06 06:38 ]
Dave Patton is offline   Reply With Quote
Old May 6th, 2002, 08:36 AM   #6
RisingPhoenix
New Member
 
Join Date: May 2002
Posts: 3
Default

Thank U for your help. I still can't seem to get the correct data back, only the row above the one that I want.

Regards,
RisingPhoenix is offline   Reply With Quote
Old May 6th, 2002, 09:11 AM   #7
kkknie
Board Regular
 
Join Date: Apr 2002
Location: Greenwood, SC
Posts: 677
Default

The range lookup seaches must be sorted (ascending). If the lookup function does not find the value to be looked up, it will return the value just before it.

It sounds to me like the value you are looking for and the value in your lookup range might be just a bit different (maybe a trailing space?).

Whenever I do lookups, I like to nest them:

=IF(LOOKUP(C4,F4:F14,F4:F14)=C4,LOOKUP(C4,F4:F15,G4:G14),"Not Found")

Where C4 is the value to search for, F4:F14 is the search range and G4:G14 is the return range.

Hope this helps,

K
kkknie is offline   Reply With Quote
Old May 6th, 2002, 10:20 AM   #8
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-05-06 05:59, RisingPhoenix wrote:
This is what I'm trying to do.
I have a list extracted from a database contaning username and logonscrip for 5 different domains (file A). I also have a list for every usernamn in a single domain(file B). I need a function to match the username from file B with the properties from file A.

Ex from file A
Testuser:T-domain:logon.bat

The fomula is =LOOKUP(A3;'User&logon'!A:A)

Can you help me?
Regards

[ This Message was edited by: RisingPhoenix on 2002-05-06 06:02 ]
What value is in A3 which figures as lookup value in the formula you posted?

Aladin Akyurek is offline   Reply With Quote
Old May 12th, 2011, 01:00 PM   #9
StreetMan
New Member
 
Join Date: May 2011
Posts: 2
Default Re: Formula Lookup returns wrong value

I too am experiencing the vlookup table returning the row above. Hmmm...
StreetMan is offline   Reply With Quote
Old May 12th, 2011, 01:03 PM   #10
jonmo1
MrExcel MVP
 
jonmo1's Avatar
 
Join Date: Oct 2006
Location: Bryan, TX
Posts: 21,127
Default Re: Formula Lookup returns wrong value

Welcome to the board...

Post your formula
Post an example set of data (including lookupvalue and the array to look in).
Post your expected results based on the example set of data.
__________________
Want better/faster responses to your questions?
Use Excel Jeanie to post samples of your sheet.

The more we learn, and the better we get at our trade, the easier it becomes to overlook the obvious.

Life moves pretty fast. If you don't stop and look around once in a while, you could miss it.
Ferris Bueller A.K.A. John Hughes, 1986
jonmo1 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 -4. The time now is 08:37 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 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