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 14th, 2002, 06:16 AM   #1
Maureen5433
Board Regular
 
Join Date: May 2002
Posts: 102
Default

I am hoping that someone can help - is there a formula (maybe similar to VLOOKUP) that will return more than just the first identical value in a list? I need the formula to keep looking and return all the matches in the list. I don't need totals, etc - I need the data in the column next to the value that corresponds to the cell being looked up. I am just learning macros and VBA and was hoping to avoid this simply because I am not that proficient at it yet and many people will be using this file once complete.

Sorry if this a repeat question. Thanks!

[ This Message was edited by: Maureen5433 on 2002-05-14 05:27 ]
Maureen5433 is offline   Reply With Quote
Old May 14th, 2002, 06:48 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-14 05:16, Maureen5433 wrote:
I am hoping that someone can help - is there a formula (maybe similar to VLOOKUP) that will return more than just the first identical value in a list? I need the formula to keep looking and return all the matches in the list. I don't need totals, etc - I need the data in the column next to the value that corresponds to the cell being looked up. I am just learning macros and VBA and was hoping to avoid this simply because I am not that proficient at it yet and many people will be using this file once complete.

Sorry if this a repeat question. Thanks!

[ This Message was edited by: Maureen5433 on 2002-05-14 05:27 ]
See my contribs in:

http://www.mrexcel.com/board/viewtop...c=7387&forum=2

http://www.mrexcel.com/board/viewtop...c=4365&forum=2

of which the following figure shows the layout.

Microsoft Excel - aaRetMultVals pleasehelpme.xls_______________Running: xl2000 : OS = Windows (32-bit) NT 5.00
(F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp
A1=Field1
*ABCDE
1Field1Field2*:alert('=MATCH(9.99999999999999E+307,Sheet1!A:A)-ROW(1:1)')>6*
220cat*39:alert('=IF($D$2,VLOOKUP($D$2,OFFSET($A$2,0,0,$D$1,2),2,0),"")')>dog
339dog**:alert('=IF(AND($D$2,COUNTIF(OFFSET($A$2,0,0,$D$1,1),$D$2)%3ECOUNTA($E$2:E2)),INDEX(OFFSET($B$2,MATCH(E2, OFFSET($B$2,0,0,$D$1,1),0),0,$D$1,1),MATCH($D$2,OFFSET($A$2,MATCH(E2,OFFSET($B$2,0,0,$D$1,1),0),0,$D$1,1),0)),"")')>fox
440cow**:alert('=IF(AND($D$2,COUNTIF(OFFSET($A$2,0,0,$D$1,1),$D$2)%3ECOUNTA($E$2:E3)),INDEX(OFFSET($B$2,MATCH(E3, OFFSET($B$2,0,0,$D$1,1),0),0,$D$1,1),MATCH($D$2,OFFSET($A$2,MATCH(E3,OFFSET($B$2,0,0,$D$1,1),0),0,$D$1,1),0)),"")')>mouse
539fox**:alert('=IF(AND($D$2,COUNTIF(OFFSET($A$2,0,0,$D$1,1),$D$2)%3ECOUNTA($E$2:E4)),INDEX(OFFSET($B$2,MATCH(E4, OFFSET($B$2,0,0,$D$1,1),0),0,$D$1,1),MATCH($D$2,OFFSET($A$2,MATCH(E4,OFFSET($B$2,0,0,$D$1,1),0),0,$D$1,1),0)),"")')>*
650rat**:alert('=IF(AND($D$2,COUNTIF(OFFSET($A$2,0,0,$D$1,1),$D$2)%3ECOUNTA($E$2:E5)),INDEX(OFFSET($B$2,MATCH(E5, OFFSET($B$2,0,0,$D$1,1),0),0,$D$1,1),MATCH($D$2,OFFSET($A$2,MATCH(E5,OFFSET($B$2,0,0,$D$1,1),0),0,$D$1,1),0)),"")')>*
739mouse***
Sheet1

To see the formula in the cells just click on the cells hyperlink

The above image was automatically generated by [HtmlMaker V1.22]
If you want this code, click here and Colo will email the file to you.
This code was graciously allowed to be modified: by Ivan F Moala All credit to Colo


Aladin
Aladin Akyurek is offline   Reply With Quote
Old May 14th, 2002, 07:20 AM   #3
crimlet
Board Regular
 
Join Date: May 2002
Location: Ipswich, Suffolk, England
Posts: 135
Default

I have solved a similar problem by getting the maco to use the filter function. If the previous post does not work then I will post the code
crimlet is offline   Reply With Quote
Old May 14th, 2002, 07:26 AM   #4
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-05-14 06:20, crimlet wrote:
I have solved a similar problem by getting the maco to use the filter function. If the previous post does not work then I will post the code
What do you mean by "If the previous post does not work"? If you really doubt, try to disprove that it doesn't work as advertised.
Aladin Akyurek is offline   Reply With Quote
Old May 14th, 2002, 07:47 AM   #5
crimlet
Board Regular
 
Join Date: May 2002
Location: Ipswich, Suffolk, England
Posts: 135
Default

Quote:
On 2002-05-14 06:26, Aladin Akyurek wrote:
Quote:
On 2002-05-14 06:20, crimlet wrote:
I have solved a similar problem by getting the maco to use the filter function. If the previous post does not work then I will post the code
Sorry aladin, I did not meen to offend, but I had the greatest confidence in yourself, I was only say that if in the event that your solution did not give her the required results that there may be another alternative
What do you mean by "If the previous post does not work"? If you really doubt, try to disprove that it doesn't work as advertised.
crimlet 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:44 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