COUNTIF with AND

MartinL

Well-known Member
Joined
Oct 16, 2008
Messages
1,141
Office Version
  1. 365
Platform
  1. Windows
Hi Guys

I have a formula that I am having issues with, there is a an example file here
https://app.box.com/s/08cucpffqosyiswsi15c

The formula is
=SUMIFS($D$4:$D$99983,$A$4:$A$99983,AND("=$I5","<$I5"+1),$D$4:$D$99983,J$4)
I think the AND part is rubbish.

I5 in this cell = 1

Col D will be 1, 2, 3 or N/A
Col A is 1.1 ... 1.23, 2.1 ... 2.15 etc

hope this makes sense to someone.

Martin
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
What is column A - text or number? If number, what is exactly the conditions that must hold for this column? And what is in J4?
 
Upvote 0
Hi Aladin

Col A is Numeric
The conditions/values are 1.1 to 1.23 then 2.1 to 2.15 the 3.1 to 3.19 all the way up to 6.10

I need to allow for additional statment lines and for statement lines to be deleted, so for example statement 1.5 could be deleted or an additional statement could be added to section 3 ie 3.20

J4 is a table in this case J4 = Score of 1
K4 = Score 3
L4 = Score 4
M4 = Score N/A (not applicable)

I5 = section 1 (1.1 to less than 2)
I7 = section 2 (2.1 to less than 3)
I9 = section 3 (3.1 to less than 4)
I11 = section 4 (4.1 to less than 5)
I13 = section 5 (5.1 to less than 6)
I15 = section 6 (6.1 to less than 7)

Scores across the top (columns)
Sections in the rows

I

J

K

L

M
1
2
3

N/A​
1
2
3
4
5
6

<tbody>
</tbody>
 
Upvote 0
Thanks Andrew

Spot on, I can also see the logic.
any idea why the AND statement does work, just for information

Martin
 
Upvote 0

Forum statistics

Threads
1,215,446
Messages
6,124,900
Members
449,194
Latest member
JayEggleton

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