why not use an array formula?
for e.g. in Plan!A2, PNo123456
and in PlanB2, 01/01/06
{=SUM(('PO Order'!A2:A14=Plan!A2)*('PO Order'!B2:B14=Plan!B2)*1)}
--
MattShoreson
------------------------------------------------------------------------
MattShoreson's Profile:
http://www.excelforum.com/member.php...fo&userid=3472
View this thread:
http://www.excelforum.com/showthread...hreadid=564303