Help with COUNTIFS for a relative newbie

dharker

New Member
Joined
Sep 23, 2013
Messages
4
Hi I need to count the number of elements in two different columns and would like to use countifs. If I use countif with the required individual criteria, I get valid results, when I combine them using COUNTIFS then I get a #VALUE! and no result. One of the columns contains business function e.g. accounts, finance etc. The other is status e.g. completed, in progress etc. The complication I think is that the business function can be empty, and this is where I'm having issues. If I COUNTIF($P1:$P320,"") I get a result, If I COUNTIF($D1:$D320,"In Progress") I get a result. If I COUNTIFS($P1:$P320,"",$D1:$D320,"In Progress") I get #VALUE!. Can anyone help me please? Much appreciated, Dave
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Your code should work with the above. I've replicated in a spreadsheet and as long as both ranges are the same (go from cell 1 to 320 in your case) then it should be fine. Only when I changed one of the ranges did I get a #Value error
 
Upvote 0
Your code should work with the above. I've replicated in a spreadsheet and as long as both ranges are the same (go from cell 1 to 320 in your case) then it should be fine. Only when I changed one of the ranges did I get a #Value error

You're brilliant! I'm so sorry to have wasted folks time with this - the range was 1 out. Corrected, the formula works and I'm getting what I need! Thank You!
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,823
Members
449,470
Latest member
Subhash Chand

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