# Row counts based on values in two columns

#### Ed Judge

##### New Member
I have a workbook ( actually several) with multiple, similar worksheets. I need to give a total row count (for each sheet) based on values found in two columns.
The values in Column F will either be 'Yes' or 'No'. The values in Column K will either be 'Absent' or 'Changed'.
I need to find the total rows where:
Col F = 'Yes' and Col K = 'Absent'
Col F = 'Yes' and Col K = 'Changed'
Col F = 'No' and Col K = 'Absent'
Col F = 'No' and Col K = 'Changed'

The number of rows in each sheet will vary.

Any assistance in pointing me in the right direction will be appreciated.

Ed Judge

### Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

#### T. Valko

##### Well-known Member
I have a workbook ( actually several) with multiple, similar worksheets. I need to give a total row count (for each sheet) based on values found in two columns.
The values in Column F will either be 'Yes' or 'No'. The values in Column K will either be 'Absent' or 'Changed'.
I need to find the total rows where:
Col F = 'Yes' and Col K = 'Absent'
Col F = 'Yes' and Col K = 'Changed'
Col F = 'No' and Col K = 'Absent'
Col F = 'No' and Col K = 'Changed'

The number of rows in each sheet will vary.

Any assistance in pointing me in the right direction will be appreciated.

Ed Judge
What version of Excel are you using?

#### Ed Judge

##### New Member
I'm using Excel for Mac 2011.

#### T. Valko

##### Well-known Member
I'm using Excel for Mac 2011.
Try these...

=COUNTIFS(F:F,"yes",K:K,"absent")

=COUNTIFS(F:F,"yes",K:K,"changed")

=COUNTIFS(F:F,"no",K:K,"absent")

=COUNTIFS(F:F,"no",K:K,"changed")

You can use cells to hold the criteria and then refer to those cells instead of hardcoding like I did.

#### Ed Judge

##### New Member
Try these...

=COUNTIFS(F:F,"yes",K:K,"absent")

=COUNTIFS(F:F,"yes",K:K,"changed")

=COUNTIFS(F:F,"no",K:K,"absent")

=COUNTIFS(F:F,"no",K:K,"changed")

You can use cells to hold the criteria and then refer to those cells instead of hardcoding like I did.

Thanks, that worked well.

#### T. Valko

##### Well-known Member
Thanks, that worked well.
You're welcome. Thanks for the feedback!

Replies
0
Views
402
Replies
14
Views
705
Replies
5
Views
969
Replies
1
Views
876
Replies
3
Views
341

1,195,667
Messages
6,011,053
Members
441,580
Latest member
BornholmerBjarne

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

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