IF; not for a cell, for a table
IF; not for a cell, for a table
(OP)
Hi Guys,
If I want to check a cell is negative or positive I write:
=IF(A1>0,"OK","ERROR")
But I want to check a table,if there is even one negative number, I see ERROR.
Is that possible?
Thanks
If I want to check a cell is negative or positive I write:
=IF(A1>0,"OK","ERROR")
But I want to check a table,if there is even one negative number, I see ERROR.
Is that possible?
Thanks





RE: IF; not for a cell, for a table
Conditional formatting is under the format menu.
RE: IF; not for a cell, for a table
why not try something like
=if((product(a1:b2))<0,"Error","OK")
works for me
Cheers
Greg Locock
RE: IF; not for a cell, for a table
you need to use countif
=if(COUNTIF(a3:B6,"<0")>0,"error","ok")
Cheers
Greg Locock
RE: IF; not for a cell, for a table
CODE
If Target.Column = 4 Then
Select Case Target.Row
Case 2 To 6
If Target.Value < 0 Then
MsgBox "Must be non-negative"
Target.Select
End If
End Select
End If
End Sub
Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting
UK steam enthusiasts: www.essexsteam.co.uk
RE: IF; not for a cell, for a table
RE: IF; not for a cell, for a table
IF(MIN(table_range)>0,"OK","ERROR")
RE: IF; not for a cell, for a table