SOLVED

Look up Name and count how many are X or Y

New Contributor

I have a table with Carriers and another column with Trailer Code (either shipping or receiving).

CaitlynEXCEL_0-1662010455034.png

What would be a good formula for counting how many shipping trailers there would be for a specific carrier? vise versa with receiving trailers 

 

I was exploring with COUNTIF and VLOOKUP but I wasn't able to get anything figured out well and kept getting NA back. 

 

 

3 Replies
What is your Excel version? Do you have Microsoft-365?
best response confirmed by CaitlynEXCEL (New Contributor)
Solution

@CaitlynEXCEL The attached workbook contains four examples of possible answers to your question. If your Excel version supports dynamic array functions, you could use FILTER. Otherwise COUNTIFS or SUMPRODUCT. Or, why not use a Pivot Table?

@CaitlynEXCEL Try COUNTIF() in this way

=COUNTIFS($D$2:$D$10,$G2,$E$2:$E$10,H$1)

Harun24HR_0-1662013076632.png