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 9th, 2002, 05:39 AM   #1
elgringo56
Board Regular
 
Join Date: Apr 2002
Location: Puerto Vallarta, Mexico
Posts: 869
Default

I have tried asking this a couple of times with no viable results, which means I am not wording it correctly. So, I will try again. I have an inventory list up to 10000 items long (the rows) with several several entrys for each item (the columns). each item has a unique designator to identify it. the designator is an alpha numeric string such as MM1 or BB7A. An operator will type in the identifier looking for a single item. Key word here is single. A Macro will take her typein and filter the list for the item and return it to her. My problem is in the critera for the filter, the item number. If An item number of, say BB6 is used as criteria, all items that contain BB6 in them, such as BB61 or BB67 will be returned. I need only the one unique item, BB6 to be returned. I know I can do this by using a criteria of '=BB6 or ="=BB6" but I cant figure out how to get the added charaters onto the BB6 string under macro control? I need to do this because then, if more than one item is returned, it must be a duplicate or if no items are returned, it must be a bad item number.

Can anyone help me, I have tried for many hours to figgure this out myself, but I guess I am just plain stupid. AAAARRRRRGGGGHHHH
elgringo56 is offline   Reply With Quote
Old May 9th, 2002, 05:56 AM   #2
philR
Board Regular
 
Join Date: Feb 2002
Location: Sheffield, UK
Posts: 249
Default

I can see why you are having a difficult time describing what you want - struggling to get my head around what you mean. Is there any way you could send me a bit of sample data? I think I know how to do what you want, but I may be misunderstanding the complexity of it.
philR is offline   Reply With Quote
Old May 9th, 2002, 06:01 AM   #3
Anne Troy
MrExcel MVP
 
Anne Troy's Avatar
 
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
Default

I used a function like this yesterday:

=IF(ISERROR(FIND(UPPER("deposit"),UPPER(C2))),"",H2)

The function finds the word "deposit" ANYWHERE in the string. I think our asker needs to find ONLY THOSE RECORDS where the string is "deposit" and nothing else.

_________________
TheWordExpert

[ This Message was edited by: Dreamboat on 2002-05-09 05:02 ]
Anne Troy is online now   Reply With Quote
Old May 9th, 2002, 06:24 AM   #4
elgringo56
Board Regular
 
Join Date: Apr 2002
Location: Puerto Vallarta, Mexico
Posts: 869
Default

The problem in this is the number that is in the string. Excel cant seem to just look for a single number. The list would look something like this within the criteria column:

MM1
MM2
MM3A
MM3B
MM4
.
.
.
.
MM21A
MM21B
MM22
MM23
O1A
O1B
O2

And so on.
elgringo56 is offline   Reply With Quote
Old May 9th, 2002, 06:37 AM   #5
philR
Board Regular
 
Join Date: Feb 2002
Location: Sheffield, UK
Posts: 249
Default

is the reference code in the middle of a string? What I mean is, does the cell with the reference number look like this:

'MM16 : Item description blah blah blah

or does it just contain the reference itself?

[ This Message was edited by: philR on 2002-05-09 05:44 ]
philR is offline   Reply With Quote
Old May 9th, 2002, 07:06 AM   #6
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default


On 2002-05-09 05:01, Dreamboat wrote:
I used a function like this yesterday:

=IF(ISERROR(FIND(UPPER("deposit"),UPPER(C2))),"",H2)

The function finds the word "deposit" ANYWHERE in the string.


=IF(ISNUMBER(SEARCH("deposit",C2)),H2,"")

would have been sufficient.

And, there is no need for an ISERROR test. Functions like FIND, SEARCH, and MATCH, they all return a number when successfull. ISNUMBER is the appropriate function/predicate to check whether the returned result is indeed a number.

Aladin Akyurek is offline   Reply With Quote
Old May 9th, 2002, 07:13 AM   #7
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-05-09 04:39, elgringo56 wrote:
I have tried asking this a couple of times with no viable results, which means I am not wording it correctly. So, I will try again. I have an inventory list up to 10000 items long (the rows) with several several entrys for each item (the columns). each item has a unique designator to identify it. the designator is an alpha numeric string such as MM1 or BB7A. An operator will type in the identifier looking for a single item. Key word here is single. A Macro will take her typein and filter the list for the item and return it to her. My problem is in the critera for the filter, the item number. If An item number of, say BB6 is used as criteria, all items that contain BB6 in them, such as BB61 or BB67 will be returned. I need only the one unique item, BB6 to be returned. I know I can do this by using a criteria of '=BB6 or ="=BB6" but I cant figure out how to get the added charaters onto the BB6 string under macro control? I need to do this because then, if more than one item is returned, it must be a duplicate or if no items are returned, it must be a bad item number.

Can anyone help me, I have tried for many hours to figgure this out myself, but I guess I am just plain stupid. AAAARRRRRGGGGHHHH
Which problem are you wording: the filtering problem or the macro problem or both? I thought your filtering was resolved in another thread.
Aladin Akyurek is offline   Reply With Quote
Old May 9th, 2002, 07:15 AM   #8
elgringo56
Board Regular
 
Join Date: Apr 2002
Location: Puerto Vallarta, Mexico
Posts: 869
Default

elgringo56 is offline   Reply With Quote
Old May 9th, 2002, 07:17 AM   #9
elgringo56
Board Regular
 
Join Date: Apr 2002
Location: Puerto Vallarta, Mexico
Posts: 869
Default

My problem is that I cant filter for something like for a cell that contains something like MM1 and find it singulary. any cell in the column that I am looking at that contains MM1, such as a cell that contains MM16 will also be found. This is driving me nuts
elgringo56 is offline   Reply With Quote
Old May 9th, 2002, 07:22 AM   #10
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-05-09 06:17, elgringo56 wrote:
My problem is that I cant filter for something like for a cell that contains something like MM1 and find it singulary. any cell in the column that I am looking at that contains MM1, such as a cell that contains MM16 will also be found. This is driving me nuts
Use my computed criteria proposal in the other thread. That will do exactly what you want. The question of how to get that under macro control, if you need help for that too, must have to be done by someone like TsTom.
Aladin Akyurek 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 02:48 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