Check if a range of cells has any number bigger or smaller than 0

41,681

Solution 1

In L2 you could use a formula like this:

=IF(OR(C2<>0;D2<>0;E2<>0;F2<>0;G2<>0;H2<>0;I2<>0;J2<>0;K2<>0);TRUE;FALSE)

and then just drag it down.

It will Return TRUE if there is a Value uneven 0 otherwise it will return FALSE.

Solution 2

Please try in L2 and copied down to L6:

=COUNTIF(C2:K2,"<>"&0)<>0  

This assumes there will only ever be numbers, not strings, in the range C2:K6. For L7 you might want:

=COUNTIF(L2:L6,"FALSE")

Solution 3

If you want to return False where all cells between column C and K contain '0' and return True for all other instances you could use:

=(CONCATENATE(C2,D2,E2,F2,G2,H2,I2,J2,K2)<>"000000000")

Or a shorter version:

=IF(COUNTIF(C2:K2,"<>0"),"True","False")

EDITED AGAIN - As per pnuts answer, this COUNTIF solution won't account 0 entered as a string, but the CONCATENATE one should

Share:
41,681
RaduS
Author by

RaduS

Updated on July 23, 2022

Comments

  • RaduS
    RaduS almost 2 years

    Is there a way to identify in column L if any of the cells between C and K contain a number greater or smaller than zero?

    If yes it should return TRUE if not it should return FALSE. So in the example picture rows number 4 and 6 should return FALSE and rows number 1,2,5 should return TRUE.

    SO25803923 question example