COUNTIFS Formula Error

kitm

New Member
Joined
Oct 31, 2023
Messages
8
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I am trying to set up a formula to count the number of months a location was compliant with a metric target. I am trying to use the COUNTIFS formula but I keep getting a #VALUE error.

The Formula I am using is =COUNTIFS(D4:F4,">-7",D4:F4,"<7",G4:O4,">-5",G4:O4,"<5")

If I COUNTIFS the two ranges independantly ie =COUNTIFS(G3:O3,">-5",G3:O3,"<5") or =COUNTIFS(D3:F3,">-7",D3:F3,"<7") they work fine.

Is there another way to combine these two, or a better formula for counting this? I have two ranges in the row because the target metric is different from January - March (+/- 7) than April-December (+/- 5)

2023 Optimus Prime Tracking.xlsm
CDEFGHIJKLMNOP
2LocationJanuaryFebraryMarchAprilMay JuneJulyAugustSeptemberOctoberNovemberDecemberTotal Months Compliant
3Christown#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A0.000.002
4Bethany Home3.21(2.27)(0.35)0.33(19.52)(0.00)(17.43)(31.50)(12.81)0.00(5.53)(8.63)#VALUE!
5Scottsdale0.00(0.40)(5.80)1.00(13.50)3.33(0.08)(7.00)(20.20)0.000.000.00
Teller OS
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Try this

Book1
ABCDEFGHIJKLMN
2LocationJanuaryFebraryMarchAprilMay JuneJulyAugustSeptemberOctoberNovemberDecemberTotal Months Compliant
3Christown1111116
4Bethany Home11
5Scottsdale11114
Sheet1
Cell Formulas
RangeFormula
N3:N5N3=SUMIFS($B3:$M3, $B3:$M3, ">0")
 
Upvote 0
I would just use
Excel Formula:
=COUNTIFS(G3:O3,">-5",G3:O3,"<5")+COUNTIFS(D3:F3,">-7",D3:F3,"<7")
 
Upvote 1
Solution
I would just use
Excel Formula:
=COUNTIFS(G3:O3,">-5",G3:O3,"<5")+COUNTIFS(D3:F3,">-7",D3:F3,"<7")
Thank you that worked. I knew it would be something silly simple.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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