If and countif

apgmin

Board Regular
Joined
Mar 1, 2010
Messages
143
Office Version
  1. 2013
Platform
  1. Windows
Please help me with this!!
=IF(AND(COUNTIF(AM2:AT2,">1")>0,I2>0),"MODULES REATTEMPTED","PASSED IN FIRST ATTEMPT")
the above is the formula I have used but it is not working
I want the formula to first check if I2 is zero or greater than zero
If it is zero or empty it should not display anything

then if it is not empty or more than zero, I want it to activate the formula (if AM2 till AT2 is greater than 1), I want it to return the message MODULES REATTEMPTED
(if AM2 till AT2 is EQUAL TO ZERO), I want it to return the message PASSED IN FIRST ATTEMPT
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
It does not work as even if I2 is empty it still displays the results
However based on your reply I did the following changes and this works perferctly, thanks for your help
=IF(I2=0,"",IF(COUNTIFS(AM2:AT2,">1"),"MODULES REATTEMPTED","PASSED IN FIRST ATTEMPT"))
 
Upvote 0
It does not work as even if I2 is empty it still displays the results
However based on your reply I did the following changes and this works perferctly, thanks for your help
=IF(I2=0,"",IF(COUNTIFS(AM2:AT2,">1"),"MODULES REATTEMPTED","PASSED IN FIRST ATTEMPT"))


I meant to post;

=IF(ISNUMBER(1/I2),IF(COUNTIFS(AM2:AT2,">1"),"MODULES REATTEMPTED","PASSED IN FIRST ATTEMPT"),"")
 
Upvote 0

Forum statistics

Threads
1,214,926
Messages
6,122,306
Members
449,079
Latest member
juggernaut24

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