I am working in a science project right now about insects, and I have been logging information about the insects I have been finding along. Right now, I realize that it was a bad decision to register the name of all the insects that I been finding per each observation. I am not allowed to provide to much information because it is confidential, but I am going to add a similar example of my case in the following table:
# of sample | insect (family) |
---|---|
1 | Dermestidae, Histeridae |
2 | Histeridae, Dichotumius |
3 | Histeriade |
4 | Dermestidae, Histeridae |
5 | Cleridae, Dichotumius |
485 | Histeriade |
486 | Dermestidae, Histeridae |
487 | Dermestidae, Cleridae |
488 | Histeriade |
Something like the above table. In my actual table, I have cells with 5 or 6 diferent insects. The thing is:
Insect (family) | Count |
---|---|
Cleridae | 54 |
Histeridae | 154 |
Dermestidae | 34 |
(There are at least 100 different insects and some of them just appear once, so it is impossible for me to search all the different names manually.
Furthermore, I was thinking about converting my table to a long structure. Something like the following;
Instead of this:
# of sample | insect (family) |
---|---|
1 | Dermestidae, Histeridae |
2 | Histeridae, Dichotumius |
3 | Histeriade |
4 | Dermestidae, Histeridae |
5 | Cleridae, Dichotumius |
I want this:
# of sample | insect (family) |
---|---|
1 | Dermestidae |
1 | Histeridae |
2 | Histeridae |
2 | Dichotumius |
3 | Histeriade |
4 | Dermestidae |
4 | Histeridae |
5 | Cleridae |
5 | Dichotumius |
I was thinking that this arrangement should be better than the one that I have now. I hope someone can help me with this issue. Thanks so much.
I tried the above, but I did´t got it. That's the reasons I asking for help.
To answer 'How can I search for all the different values?', the below formula will create a unique list of the insect families (where the insect families are in range B2:B100
)
=UNIQUE(TEXTSPLIT(TEXTJOIN(", ",TRUE,B2:B100),"|",", ",TRUE))
You will then be able to use a COUNTIF()
formula to find how many tests contain each family.