If and countif

apgmin

Board Regular
Joined
Mar 1, 2010
Messages
150
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

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
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,224,823
Messages
6,181,182
Members
453,021
Latest member
Mohamed Magdi Tawfiq Emam

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