Forum Discussion
A_SIRAT
Jan 25, 2020Iron Contributor
Count Function
Please assist with a formula. Thanks.
- Jan 26, 2020
Alternatively in F5 and copy down.
=SUMPRODUCT(IFERROR(1/(E5=$A$2:$A$33),""),1/COUNTIF($B$2:$B$33,$B$2:$B$33))
Depending on your Excel version you may have to press Ctrl-Shift-Return to enter it. Note that your list doesn't have to be sorted by commodity. It will always count the number of boxes that each commodity has in storage.
Riny_van_Eekelen
Jan 26, 2020Platinum Contributor
Alternatively in F5 and copy down.
=SUMPRODUCT(IFERROR(1/(E5=$A$2:$A$33),""),1/COUNTIF($B$2:$B$33,$B$2:$B$33))
Depending on your Excel version you may have to press Ctrl-Shift-Return to enter it. Note that your list doesn't have to be sorted by commodity. It will always count the number of boxes that each commodity has in storage.
- A_SIRATJan 26, 2020Iron ContributorThank you Riny. It works to my expectation!