Is this slow code?
=SUMPRODUCT(($F$2:$F$28=A2)*($H$2:$H$28=MyConst))
OK I give up - I'm going to bed.
Make that:-
=SUMPRODUCT((Col1=A2)*(Col2=MyConst))
--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03
----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------
"Ken Wright" wrote in message
...
Assuming it doesn't necessarily have to be code:-
With your 30 values in say A1:A30, and your constant in any cell that you have
named MyConst, and assuming your two ranges of data you are matching against
are
named Col1 and Col2, then in cell B1 put the following and copy down to cell
B30
=SUMPRODUCT(($F$2:$F$28=A2)*($H$2:$H$28=MyConst))
In any other cell you can either sum the data in B1:B30 and anything over 0
means a match, or you can do a COUNTIF and pick up on any value greater than
0.
|