View Single Post
  #5   Report Post  
Max
 
Posts: n/a
Default

Think what was suggested earlier wasn't that far off. The resulting arrays
will be visible if you highlight the formula in the formula bar and press
F9.

I have numbers in cells A2,B2 & C2
I want to compare each one of those cells (a2, b2 & c2) to a number in
cell D1, and determine whether it is less than or equal to the value in
D1. and then return a single set of results in an array in a single cell
(eg in cell D2)


Suppose A2:C2 contains: 12, 13, 14
and D1 contains: 13

Put in the formula bar in D2, and array-enter:
=IF($A2:$C2="","",--($A2:$C2<=D$1))

Then select the entire formula in the formula bar and press F9
You will see that the formula in D2 evaluates to : ={1,1,0}

... what does - - mean in array forumula - what does it do.


The "--" is what they call a double unary which coerces the TRUE / FALSE
returns in the comparisons evaluated within the parens to numeric 1's / 0's
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Ruthki" wrote in
message ...

I really need some help with this - so I will try putting it another
way

The forumla should
return 1 when cell is less than or equal to value in A4
return 0 when cell is not less than or equal to value in A4.

Therefore the resulting array would be something like {1,0,1}
which would mean
A2 is less than or equal to the value in D4
B2 is not
C2 is

Can anyone let me know if this is poss.

Can you also tell me what does - - mean in array forumula - what does
it do.

Thanks

Ruth


--
Ruthki
------------------------------------------------------------------------
Ruthki's Profile:

http://www.excelforum.com/member.php...o&userid=24503
View this thread: http://www.excelforum.com/showthread...hreadid=383429