=if(and(or(a1="fred",b1="fred"),d1="a"),if(c1="buy ",e1-g1,g1-e1))
--
kraljb
------------------------------------------------------------------------
kraljb's Profile:
http://www.excelforum.com/member.php...fo&userid=9955
View this thread:
http://www.excelforum.com/showthread...hreadid=523627