Find, group and rename data based on a word (of several) in cell

Oth

New Member
Joined
Mar 9, 2011
Messages
9
Hi all, I am new to the board and this is my first own post..
First I need to thank you all for the help you have already given me over the years when I have searched for solutions - this is truly an amazing source of information!!

I have searched long for the solution but I might have used the wrong terminology..?

I basically want to group stuff from table (A-D) of 10K items, rename them according to a template and create a new shorter list (G-J). ((Every month I will get a new A-D list))

The words I am looking for (in this exmple the fruits) can be anywhere in the cell. The cells might include many kind of signs (*/-., etc).
In some situations (as in A5) two of the searched words might be in the cell - are there options on how to solve that?
I understand I might need to create a lookup/group list of some sort but am not sure how to do it.
I can not change the original list unfortunately - so any clean up of that
has to be simple enough for me to handle it.

If you have time and ability to help, please remember I am a novice on excel. :-D
Thanks in advance.

I am now attempting to use MR excel html to show you a view of what the problem is (no formulas in the example):

Excel Workbook
ABCDEFGHIJ
1Original listResult in new list
2Sold productsJanFebMarchhow I want it grouped:Product groupsJanFebMarch
3Applepie252AppleApple products243227
4Apples423Banana (what happens to the Apple and banana pie?)Banana products26147
5pie.-Apple and banana286Lemon + MeatOther products242421
6Applesauce757Any otherSpecials568
7XXapple-sauce649Total sum797663
8apple* cjd* juice380
9Candy kkns223
10Bananas1971
11bananacurry435Searching for a solution compatible with Excel 2003
12chicken with bananas341If not doable in 2003 - is it doable in 2007 or 2010?
13lemon970Original list is ca 10k items
14lemon-curd134Colors are only for showing here.
15chicken with lemons235
16Meatloaf333
17Meat loaf444
18Meat-pie545
19potatoes345
20Total797663
Sheet1
Cell Formulas
RangeFormula
H7=SUM(H3:H6)
I7=SUM(I3:I6)
J7=SUM(J3:J6)
B20=SUM(B3:B19)
C20=SUM(C3:C19)
D20=SUM(D3:D19)
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Thanks for your answer!

To be honest, I don't know. Which ever solution is applied, it needs to be able to handle the original list of ca 10'000 rows + I expect the grouped list to be ca 3-5000 rows.
/C
 
Upvote 0
A custom autofilter, for example, would show you all of the rows that contain the word "Apple" anywhere in the cell (of any selected column). It would tell you how many rows meet this criteria (10K, 65K doesn't matter). You would create the data you have shown in columns G:J by hand.

Search help for "custom auto filter" if you care to give it a try. Use the "contains" operator

Gary
 
Upvote 0
Thanks Gary.
Do I need to do this for the whole list every time the original list is updated?
If yes, then I think I do need an (at least partly) automated solution since the list is updated often.
/C
 
Upvote 0
Sorry, you would have to re-create any summary data (col G:J) every time.

You could add a subtotal formula. For example at the bottom of your column B in the original example =SUBTOTAL(9,B3:B19)

Subtotaling would add up the values in column B for the data that remains displayed (that contain "apple" sticking with the original example). You could use the subtotal function in as many columns as you need.

Gary
 
Upvote 0
ok, good, thats an improvement, but I will still need to edit the filter ca 3-5000 times (since the total grouped list has 3-5000 entries). Right?
I can definitely do that once or twice - but it would be to much to do it every other week. Perhaps it can not be done automated in excel?
 
Upvote 0
The technique we've been discussing is practical for a few filters. You've got a lot more patience than I do if you willing to do several thousand a week:biggrin:

This can be done via code but it would probably get rather involved. If you don't have programming experience it would probably be very difficult.

Gary
 
Upvote 0
You could get a feel for the code required by turning on the macro recorder and repeating the steps you have probably already performed as a result of this discussion. The macro recorder usually generates much more code than is really needed. If you want to give it a shot, there are many people in this group that will be happy to give you tips on how to improve the code. Just ask clear and specific questions about small pieces of the code and I'm sure you'll get plenty of help.

Gary
 
Upvote 0
Hehe, patience or not, somethings just has to be done, in this case I prefer the easier way if at all possible :-D

My hope was to get a hint on which way to go - then I'll give that to my friend (she is busy now) who has more excel coding experience than me - so we can test it. :rofl:
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,762
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top