View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
bob bob is offline
external usenet poster
 
Posts: 52
Default Can anyone solve this!?



Hi Ken,

Thanks for your response.

I tried using the formula you gave me for the
data in the example below, however it doesn't return the
correct result of 0.79.

am I doing something wrong ?

Please advise,

Many thanks,

-----Original Message-----
Try the following:-

=MIN(IF(($A$2:$A$4000=1003)*($C$2:$C$4000="R1") *

($D$2:$D$4000=23),$B$2:$B$4000))

array entered using CTRL+SHIFT+ENTER

Assumes that the 1003 and 23 fields are numeric, but if

not then simply enclose
them with quotes, ie:-

=MIN(IF(($A$2:$A$4000="1003")*($C$2:$C$4000="R1") *

($D$2:$D$4000="23"),$B$2:$B$40
00))

or any mixture depending on your data.

--
Regards
Ken....................... Microsoft MVP -

Excel
Sys Spec - Win XP Pro / XL2K & XLXP

----------------------------------------------------------

------------------
Attitude - A little thing that makes a BIG difference
----------------------------------------------------------

------------------



"Bob" wrote in

message
...


Imagine the following data:

A B C D
1003 0.89 R1 23
1003 0.59 R2 24
2444 0.32 R1 23
2444 0.84 R2 24
1003 1.14 R3 13
1003 0.79 R1 23
1003 0.12 R1 16


WITHOUT using ANY LOOPS (or ADO/SQL), I would like to
retrieve the lowest value for B , where A = 1003 and C =
R1 and D = 23 (affectively criteria from the first row).

In this case the answer should be B=0.79.


Does anybody know a way that this can be done!? (it

would
have to work assuming that there were 4000+ rows in the
table)







---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.532 / Virus Database: 326 - Release Date:

27/10/2003


.