Shadowsliver
New Member
- Joined
- Dec 30, 2017
- Messages
- 3
Hi,
I have trouble with categorizing large amounts of text data for my home economy overview.
So I have a table with text strings (column A) and numbers (column B), and I will create a table with "search words" for the different categories I want to make, similar to this example:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Text[/TD]
[TD]Amount[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Category[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Apple[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Fruits[/TD]
[TD]Vegetables[/TD]
[TD]Berries[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]More Apple[/TD]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Apple[/TD]
[TD]Carrot[/TD]
[TD]berry[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Carrot[/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Banana[/TD]
[TD]Tomato[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Blueberry[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Carrot[/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Apple[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Lingonberry[/TD]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
What I want to do, is primarily to have a function find how many fruits there are, how many vegetables and how many berries. Like the bold summary shown below.
Most of the time it will not be an exact string match (so the function needs to find a matching fragment, "berry" in blueberry for instance).
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Text[/TD]
[TD]Amount[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Category[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Apple[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Fruits[/TD]
[TD]Vegetables[/TD]
[TD]Berries[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]More Apple[/TD]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Apple[/TD]
[TD]Carrot[/TD]
[TD]berry[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Carrot[/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Banana[/TD]
[TD]Tomato[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Blueberry[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Carrot[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]Summary[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Apple[/TD]
[TD]5[/TD]
[TD][/TD]
[TD]Fruits[/TD]
[TD]18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Lingonberry[/TD]
[TD]8[/TD]
[TD][/TD]
[TD]Berries[/TD]
[TD]13[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I have struggled to find the right function to be able to use strings from one matrix to categorize strings in another matrix to the summarize, for each category, the numbers associated with the strings.
Any help would be much appreciated, thanks in advance!
I have trouble with categorizing large amounts of text data for my home economy overview.
So I have a table with text strings (column A) and numbers (column B), and I will create a table with "search words" for the different categories I want to make, similar to this example:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Text[/TD]
[TD]Amount[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Category[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Apple[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Fruits[/TD]
[TD]Vegetables[/TD]
[TD]Berries[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]More Apple[/TD]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Apple[/TD]
[TD]Carrot[/TD]
[TD]berry[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Carrot[/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Banana[/TD]
[TD]Tomato[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Blueberry[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Carrot[/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Apple[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Lingonberry[/TD]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
What I want to do, is primarily to have a function find how many fruits there are, how many vegetables and how many berries. Like the bold summary shown below.
Most of the time it will not be an exact string match (so the function needs to find a matching fragment, "berry" in blueberry for instance).
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Text[/TD]
[TD]Amount[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Category[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Apple[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Fruits[/TD]
[TD]Vegetables[/TD]
[TD]Berries[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]More Apple[/TD]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Apple[/TD]
[TD]Carrot[/TD]
[TD]berry[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Carrot[/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Banana[/TD]
[TD]Tomato[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Blueberry[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Carrot[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]Summary[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Apple[/TD]
[TD]5[/TD]
[TD][/TD]
[TD]Fruits[/TD]
[TD]18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Lingonberry[/TD]
[TD]8[/TD]
[TD][/TD]
[TD]Berries[/TD]
[TD]13[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I have struggled to find the right function to be able to use strings from one matrix to categorize strings in another matrix to the summarize, for each category, the numbers associated with the strings.
Any help would be much appreciated, thanks in advance!