View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom[_2_] Peo Sjoblom[_2_] is offline
external usenet poster
 
Posts: 964
Default Variable Or Command


=COUNTIF(K2:INDEX(K2:K10000,L2),"<=30")0

will return TRUE if any of the values of K2:K(L2) are less than or equal to
30

it's hard to understand what you are trying to do, if this is possible what
would
you expect the result to be if all values were <=30?

--


Regards,


Peo Sjoblom

"str83dgeboi" wrote in message
...
I am trying to figure this out... I want to do something like

=OR(K2:K(L2) <=30) where L2 is a variable number, so it would end up being

L2 = 4 (but it is the sum of several numbers used else where)
=OR(K2:K4 <=30)
and this way it checks if
K2 <= 30
K3 <= 30
K4 <= 30

And will return True if one of these is true...

I tried =OR(INDIRECT("K"&2&":K"&$L2) <=30)
Which only checks the first one and not the others

Any ideas?