Comparing 3 different cells and returning a value using Countifs()

Sha

New Member
Joined
Oct 6, 2021
Messages
30
Office Version
  1. 2013
Platform
  1. Windows
Hi there,

Thank you so much for looking and helping me out with this.

I am currently using a Countifs() to count the number of long stayers (length of stay) that fall within a certain range. The Countifs() which i have is currently counting the number of cases which fall under the rangers of 1 to 7, 8 to 14, 15 to 21 (No of counts) and so on as seen in the picture below. However, i would need the countifs() to only count the cases under CVM and CTS individually. All the CVM and CTS cases are placed together in 1 single excelsheet,

Code used is :
Excel Formula:
 =COUNTIFS(N1:N1986, ">=" & G31,N1:N1986, "<=" & H31)

I tried using the below code but its giving me an error message.
Excel Formula:
 =COUNTIFS(H1:H1986 "=cvm", N1:N1986,">=" & B41,N1:N1986, "<=" & C41)

Column H is where Discipline (CTS/CVM) are located.

I really hope someone would be able to help me out. Thank you so much once again.


image001.png
image002.png
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
You're missing a comma after the H1:H1986
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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