SOLVED

New Contributor

# Look up Name and count how many are X or Y

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

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

# Re: Look up Name and count how many are X or Y

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

# Re: Look up Name and count how many are X or Y

@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?

# Re: Look up Name and count how many are X or Y

@CaitlynEXCEL Try COUNTIF() in this way

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