Question on Countifs formula

bmackie97

New Member
Joined
Oct 4, 2011
Messages
6
I am trying to use the countifs function to count the number of times a vendor name appears in a range but also based on specific currencies. The issue is when there are multiple vendor names I need to count with the same currency. I can sum multiple countifs functions to get the answer I need but wondering if there is an easier and cleaner way to do this. I have included a brief sample below. Here I would want to count the number of times a vendor name is populated in column B if the currency is USD and The Vendor is A, B, or C.


<colgroup><col style="width:48pt" span="2" width="64"> </colgroup><tbody>
[TD="class: xl62, width: 64"]Currency[/TD]
[TD="class: xl62, width: 64"]Vendor[/TD]

[TD="class: xl62"]USD[/TD]
[TD="class: xl62"]A
[/TD]

[TD="class: xl62"]USD[/TD]
[TD="class: xl62"]B[/TD]

[TD="class: xl62"]USD[/TD]
[TD="class: xl62"]C[/TD]

[TD="class: xl62"]USD
[/TD]
[TD="class: xl62"]D
[/TD]

[TD="class: xl62"]BRL[/TD]
[TD="class: xl62"]B[/TD]

[TD="class: xl62"]MXN[/TD]
[TD="class: xl62"]C[/TD]

</tbody>
 
You could perhaps try something like this?


Excel 2010
AB
CurrencyVendor
USDA
USDB
USDC
USDD
BRLB
MXNC
USD

<colgroup><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]

[TD="align: center"]4[/TD]

[TD="align: center"]5[/TD]

[TD="align: center"]6[/TD]

[TD="align: center"]7[/TD]

[TD="align: center"]8[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]9[/TD]

[TD="align: right"]3[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Array Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: #DAE7F5"]B9[/TH]
[TD="align: left"]{=SUM((A2:A7=A9)*(B2:B7={"A","B","C"}))}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]



Hope that helps


/AJ
 
Upvote 0
Try:
Code:
=SUMPRODUCT(--($A$1:$A$8="USD"),--($B$1:$B$8="A"))
 
Upvote 0

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