CountIF question with criteria in different column

nostradamus

Board Regular
Joined
Aug 9, 2010
Messages
143
Office Version
  1. 365
Platform
  1. Windows
Table 1 is in spreadsheet Data, and the formulas are in the next spreadsheet
There are several Genus under Family; and several Family under Order – Hierarchical order.
(Family or Genus names are unique to each Hierarchy)

Table 1
ABCDE
1OrderFamilyGenusStageAbundance
2ColeopteraElmidaeStenelmis5
4OdonataCalopterygidaeHetaerina1
5TrichopteraHydropsychidaeHydropsyche67

<tbody>
</tbody>

Table 2
AB
1EPT taxa abundance73

<tbody>
</tbody>

Currently, I have this formula in col B1 (2nd table)
=IF(SUM(SUMIF(Data!B:B,{"Ephemeroptera","Plecoptera","Trichoptera"},Data!F:F))<>0,SUM(SUMIF(Data!B:B,{"Ephemeroptera","Plecoptera","Trichoptera"},Data!F:F)),"")

The current formula gives the sum of Abundance (col E) based on the selected Orders in col A.(total= 73)
I want this formula to reflect the COUNT of Genus (col C) based on the selected Orders in col A.(= so the answer should be 3, because of 3 different Genus)

Please note, if there are repetitions of Genus, I do not want it to count it twice.
I know I can do this in a Pivot table, but I have several formulas in the 2nd spreadsheet, and this is just one of the formulas.

Thanks.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Let me clarify the question a bit more.
There can be any number Orders, but the ones I'm interested are "Ephemeroptera","Plecoptera","Trichoptera"
There can also be several different Genus within Order (as in different cities within a State, only difference here is that you won't find Genus with same names under one Order, i.e., they are unique).
The info in Table (col E is irrelevant to the problem at hand, pl. disregard). I only want the COUNT of Genus, based on the Order. So in Table 1, the count for Genus would be 1, as only one of the Genus is of the desired Order (Trichoptera; in the current table, Eph. and Plec. are not present)
 
Upvote 0

Forum statistics

Threads
1,221,525
Messages
6,160,329
Members
451,637
Latest member
hvp2262

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