Minimum With Two Criteria
The factors that look like this:
tbl!a2:a257=$a$1
will return an array of true/falses.
Multiplying them together will give you an array of 0's and 1's (1 when both
things are true at the same time).
So if the values in e2:e257 are all non-negative, the smallest value you'll see
is 0 (0 times anything will be 0).
I think you want:
=MIN(IF((Tbl!A$2:A$257=$A$1)*(Tbl!$D$2:$D$257=$A4) ,Tbl!$E$2:$E$257))
This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)
Adjust the range to match--but you can only use the whole column in xl2007.
goss wrote:
Hi all,
I would like to run a variety of functions against a payrate table
But I can't seem to get the first function to work
The formula is returning 0, but should return $9.00
The table is setup correctly with no breaks in data
I visibly reviewed all items since HR sent me the table-all looks
correct
Do you see any errors in my formula below or any other ideas?
Thanks!
goss
=SUMPRODUCT(MIN((tbl!A$2:A$257=$A$1)*(tbl!$D$2:$D$ 257=$A4)*(tbl!$E$2:$E
$257)))
Where $A$1 = New Hire (sp is correct copied from tblPayRate)
Where $A4 = Cashier (sp is correct, copied from tblPayRate)
Where Col A is "New Hire" or other designation
Where Col D is "Cashier" or other position
Where Col E is range of values
--
Dave Peterson
|