Excel formula, nested CountIF's?

Ben171

Board Regular
Joined
Jul 2, 2021
Messages
88
Hi there, i have the following column H, there are 2000 rows in this column. I would like to do a formula which counts the total number of rows that are "underpaying" and the total that are "overpaying"

I created the following formula

VBA Code:
= "Overpaying: " &COUNTIF(H4:H2052,"OVERPAYING")

This works well, but how can i include the underpaying in this formula so it displays both in one cell? if possible



1636040935351.png
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
How about
Excel Formula:
= "Overpaying: " &COUNTIF(H4:H2052,"OVERPAYING") & " Underpaying: "&COUNTIF(H4:H2052,"underpaying")
 
Upvote 0
Solution
How about
Excel Formula:
= "Overpaying: " &COUNTIF(H4:H2052,"OVERPAYING") & " Underpaying: "&COUNTIF(H4:H2052,"underpaying")
that worked perfectly. I didn't know could just do '&' and then do another formula. That's great thank you!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,453
Messages
6,124,930
Members
449,195
Latest member
Stevenciu

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