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 17th, 2002, 08:17 PM   #1
Azad
New Member
 
Join Date: May 2002
Posts: 5
Default

Is there a way to get the vlookup function to return the cell address, rather than the value, of the lookup?

please also reply to azad.padamsey@boc.jgc.co.jp
Azad is offline   Reply With Quote
Old May 17th, 2002, 08:52 PM   #2
Asala42
Board Regular
 
Join Date: Feb 2002
Location: Southfield,MI USA
Posts: 1,030
Default

G'day,

Have you considered involving the MATCH function? It should get you partway there.

Adam
Asala42 is offline   Reply With Quote
Old May 17th, 2002, 09:35 PM   #3
Tom Urtis
MrExcel MVP
 
Tom Urtis's Avatar
 
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,388
Default

Maybe a formula like this will work. Modify for ranges and column reference (I used column A as a hard code in the formula, after the word "cell".

=VLOOKUP(A3,$A$1:$A$3000,1,0)&" Found in cell A"&MATCH(A3,Sheet2!$A$1:Sheet2!$A$3000,0)

Any help?
__________________
Tom Urtis
Microsoft MVP - Excel
Tom Urtis is offline   Reply With Quote
Old May 18th, 2002, 01:07 AM   #4
Azad
New Member
 
Join Date: May 2002
Posts: 5
Default

Tom,
This is what I am trying to achieve:
I am using the HLOOKUP function (Excel 2000) .Say for example the value returned is 20.I need to know where the "address" of the value 20
is in (i.e. $c$8).I tried to use the CELL function in the following manner,but no luck.

=CELL("address",((HLOOKUP($E$5,$J$11:$HO$185,2,FALSE))))
Azad is offline   Reply With Quote
Old May 18th, 2002, 05:03 AM   #5
Nimrod
MrExcel MVP
 
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
Default

OK Adza:
I've worked out an answer if you don't mind one hidden sheet !

In this solution I have three sheets:
(1)"Data" which is your array of Data Range(A:Z)
(2)"hidden" Which has one formula dragged from Range A2-Z2
(3) Query sheet A1= The text you want to find, A2= location where text found

DATA SHEET : On this sheet just paste your data

HIDDEN SHEET:
Row 1: drag the column letters across TOP row i.e. A1.value = A, B1.value = B etc.

Row 2: Paste the following formula into A2 then drag across to Z2
Code:
=IF(NOT(ISERROR(MATCH('Query sheet'!$A,(Data!A:A),0))),A1&MATCH('Query sheet'!$A,(Data!A:A),0),"")
QUERY SHEET:
Cell A1: just type in what text you want to search for
Cell A2:
Code:
=CONCATENATE(Hidden!2:2)
Please let me know if this work for you ... Thanks




[ This Message was edited by: Nimrod on 2002-05-18 04:15 ]
Nimrod is offline   Reply With Quote
Old May 18th, 2002, 11:43 AM   #6
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default


This is what I am trying to achieve:
I am using the HLOOKUP function (Excel 2000) .Say for example the value returned is 20.I need to know where the "address" of the value 20
is in (i.e. $c$8).I tried to use the CELL function in the following manner,but no luck.

=CELL("address",((HLOOKUP($E$5,$J$11:$HO$185,2,FALSE))))


=IF(COUNTIF($J$11:$HO$185,E5),ADDRESS(SUMPRODUCT(($J$11:$HO$185=HLOOKUP(E5,$J$11:$HO$185,2,0))*(ROW($J$11:$HO$185))),SUM PRODUCT(($J$11:$HO$185=HLOOKUP(E5,$J$11:$HO$185,2,0))*(COLUMN($J$11:$HO$185)))),"Not Found")

If the HLOOKUP part is properly set up, this (copyrighted) formula will give you the desired address.

Aladin



[ This Message was edited by: Aladin Akyurek on 2002-05-18 10:46 ]
Aladin Akyurek is offline   Reply With Quote
Old May 19th, 2002, 05:32 PM   #7
Azad
New Member
 
Join Date: May 2002
Posts: 5
Default

Aladin,
Your solution works beautifully.Now I have to study your (copyrighted) formula to understand it properly.So much formula to achieve what is reasonably a simple task.
Many Thanks to all who responded.
Regards
Azad
Azad is offline   Reply With Quote
Old May 19th, 2002, 05:54 PM   #8
Nickleby
 
Join Date: May 2002
Posts: 26
Default

Quote:
On 2002-05-18 10:43, Aladin Akyurek wrote:

This is what I am trying to achieve:
I am using the HLOOKUP function (Excel 2000) .Say for example the value returned is 20.I need to know where the "address" of the value 20
is in (i.e. $c$8).I tried to use the CELL function in the following manner,but no luck.

=CELL("address",((HLOOKUP($E$5,$J$11:$HO$185,2,FALSE))))


=IF(COUNTIF($J$11:$HO$185,E5),ADDRESS(SUMPRODUCT(($J$11:$HO$185=HLOOKUP(E5,$J$11:$HO$185,2,0))*(ROW($J$11:$HO$185))),SUM PRODUCT(($J$11:$HO$185=HLOOKUP(E5,$J$11:$HO$185,2,0))*(COLUMN($J$11:$HO$185)))),"Not Found")

If the HLOOKUP part is properly set up, this (copyrighted) formula will give you the desired address.

Aladin



[ This Message was edited by: Aladin Akyurek on 2002-05-18 10:46 ]

What do you mean by "(copyrighted) formula" ?
Nickleby is offline   Reply With Quote
Old May 20th, 2002, 01:56 AM   #9
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-05-19 16:54, Nickleby wrote:
Quote:
On 2002-05-18 10:43, Aladin Akyurek wrote:

This is what I am trying to achieve:
I am using the HLOOKUP function (Excel 2000) .Say for example the value returned is 20.I need to know where the "address" of the value 20
is in (i.e. $c$8).I tried to use the CELL function in the following manner,but no luck.

=CELL("address",((HLOOKUP($E$5,$J$11:$HO$185,2,FALSE))))


=IF(COUNTIF($J$11:$HO$185,E5),ADDRESS(SUMPRODUCT(($J$11:$HO$185=HLOOKUP(E5,$J$11:$HO$185,2,0))*(ROW($J$11:$HO$185))),SUM PRODUCT(($J$11:$HO$185=HLOOKUP(E5,$J$11:$HO$185,2,0))*(COLUMN($J$11:$HO$185)))),"Not Found")

If the HLOOKUP part is properly set up, this (copyrighted) formula will give you the desired address.

Aladin



[ This Message was edited by: Aladin Akyurek on 2002-05-18 10:46 ]

What do you mean by "(copyrighted) formula" ?
It means: When you use it (it's free), don't forget to remember the poor guy who devised it.

Aladin
Aladin Akyurek is offline   Reply With Quote
Old May 14th, 2005, 10:06 PM   #10
ahlimosa
New Member
 
Join Date: May 2005
Posts: 12
Default big help

now I the search from A column and return the number "8"
then I want to show the data in B"8" (B*)
I've try to use value, but its now working
anybody can help
ahlimosa 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 03:31 PM.


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