Try this:
=SUMPRODUCT(--(A1:A7=3),--(B1:B7>2000),--(B1:B7<4000),D1:D7-C1:C7)
Based on your sample data the result is 8.

Signature
Biff
Microsoft Excel MVP
> hello,
>
[quoted text clipped - 11 lines]
> it is equal 3 on column A, and between 2000 to 4000 of column B, which
> formula should i use? Please help. thanks
kim - 13 Mar 2008 19:15 GMT
it works. thanks so much
> Try this:
>
[quoted text clipped - 17 lines]
> > it is equal 3 on column A, and between 2000 to 4000 of column B, which
> > formula should i use? Please help. thanks
T. Valko - 13 Mar 2008 19:42 GMT
You're welcome. Thanks for the feedback!

Signature
Biff
Microsoft Excel MVP
> it works. thanks so much
>
[quoted text clipped - 20 lines]
>> > it is equal 3 on column A, and between 2000 to 4000 of column B, which
>> > formula should i use? Please help. thanks