countifs <, >, errors, including equals to in values

Macklin

Board Regular
Joined
Jun 1, 2011
Messages
51
I have found an oddity in my countifs program where it is counting the value it is suppose to be greater than.

Code:
Worksheets("sheet1").Range("I7").Value = [countifs(sheet1!F2:F10000,"="&sheet1!R1,sheet1!P2:P10000,">219*")] 
Worksheets("sheet1").Range("I17").Value = [countifs(sheet1!F2:F10000,"="&sheet1!R1,sheet1!P2:P10000,"<219*")]

The range ("I7") will include 219A and 219B when it calculates a value.
The range ("I17") doesn't include the 219A/B values and counts from 218A/218B and lower.

Thats is what I want, but originally I had ">218*" which I thought would only include 219 and up, but it also included 218. Does anyone know why the > than symbol is including "= to" and why the < than doesn't include "= to"...???

Macklin
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,207,255
Messages
6,077,307
Members
446,278
Latest member
hoangquan2310

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