Complicated problem... let me explain first, maybe there is a better solution rather than using iterative calculations:
Image showing example (to show what I'm working with)
PROBLEM:
Have 4,000+ Strings and would like to categorize them into pre-determined Groups (based on the String's content).
Each String should only be assigned to one Group. (ie. "55 gallon drum faucet" will be listed under "faucet" column, since it contains the word "faucet".)
Once categorized into a Group, the string won't be categorized under any other Groups. (ie. "55 gallon drum faucet" won't be categorized under "drum" once it's already been categorized under "faucet").
It really doesn't matter which Group each String does under, as long as it's categorized.
Note: (I've almost found a solution using iterative calculation, but it doesn't quite work).
SOLUTION:
The way I approached the problem was:
Count the number of times the String (Column A) was duplicated in the worksheet using the formula:
Formula: =COUNTIF($E$2:$IA$10000,A3)
- This formula goes in Column C.
Created a formula that will categorize a String underneath a Group based on whether the String contains the Group word (ie. "faucet", "beer", "gallon", "kitchen", etc)... AND has not been used before (ie. Column C, which contains the formula from above).
Formula: =IF(C3<1,IF(IFERROR(SEARCH("faucet",A3),0)>0,A3,""),"")
Drag formula down for all 4,000 strings in Column C, and for each individual "Group" column.
The problem with this approach is that it will do an iterative calculation which will either:
- Categorize the String under a Group (but WON'T increase the Times Dup'd field from 0 to 1)...
OR
- Increase the "Times Dup'd" field from 0 to 1 BUT will keep the String from being categorized under the Groups column.
Any suggestions on how to address the iterative calculation issue? (I know it keeps calculating back and forth since it's dependent, so will have to settle with 1 "right" solution... I'm wondering if there's any way to create some sort of 'block' so it can only be calculated one way...)
Any help would be greatly appreciated!