Count IF Counting a values in a row, but only if two other rows have specific values.

xryanx

Board Regular
Joined
Jul 30, 2015
Messages
61
I hope that I ask this correctly.

In the first table B5 needs to equal the count of all in B31:B200, but only for the same value as in A5. I currently have this formula: =COUNTIF(B31:B218, A5)

But now I have a problem, I need that to be true only if the cell in column C in the same row number is FR.
Ex: B32 = DR
B35 = DR
C32 = FR
C35 = FR
That combination is how B7 has a value of 2. IF C35 were to change to CB, then B7 would change to 1.

Any help is appreciated. Thank you



ABCDEFG
5R 1 $60.00$60.00
6RK1 $65.00$65.00
7DR2 $380.00 $380.00
8HS
9BP

<colgroup><col style="width: 30px; font-weight: bold;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"></colgroup><tbody>
</tbody>


ABCDEFGHIJKLMN
30DateSPType (FR or CB)LocationDate of RepairReferral #NameVehicleDate of Replace $$$ Full Replacement$$$ ClawbackDays Since Repair
311/15/2018JYFR30812/8/2017 2017 Ford Escape
321/23/2018DRFRLV12/16/2017 2008 Ford Edge1/25/2018$190.00
331/23/2018IDFR3088/28/2017 2016 Hyundai Santa Fe
341/23/2018JYFR3551/14/2018 2009 Chevy T&C
351/25/2018DRFRLV3/14/2017 2010 Ford Edge1/25/2018$190.00
361/26/2018RKCBNEL6/22/2017 2008 Jeek Cherokee1/26/2018 $65.00
371/26/2018R CBNEL10/6/2016 2016 Ford Escape1/26/2018 $60.00

<colgroup><col style="width: 30px; font-weight: bold;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"><col style="width: 68px;"></colgroup><tbody>
</tbody>
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Your requirement is not very clear but I think you can do what you want with the countifs function :
=COUNTIFS(B31:B218, A5,A31:a218,"FR")
 
Upvote 0
All I had to do was change A31:A218 to C31:C218. But that worked perfectly. I'm glad that you were able to decipher my question. Thank you so much.
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,200
Members
449,072
Latest member
DW Draft

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