have Excel retrieve conditional operator ( < > = ) from a cell

D

davidbarbetta

I'd like to enter "<" ">" "=" "<=" ">=" in a cell (e.g. cell E11), and
then have a formula which evaluates based on that entry. (I'm
analyzing a ton of data and I need one formula I can paste throughout
the worksheet.) The formula I'm working with is:

=SUMPRODUCT(--(INDIRECT(E$9)<E$12),--(Machine=$B21))

Is there any way to substitute the entry in cell E11 ("<" ">" "=" etc)
for the "<" in my formula? Something like

=SUMPRODUCT(--(INDIRECT(E$9) LOGICOPERATOR(E$11) E$12),--(Machine=
$B21))

where LOGICOPERATOR(E$11) would be interpreted as "<" ">=" "=" or
whatever was in cell E11? Thanks!
 
D

David Billigmeier

Have a look at the database functions (i.e. DCOUNT(), DCOUNTA(), DSUM())...
Sounds like using DCOUNTA() will work for you.
 
Top