Thread: DSUM?
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default DSUM?

Habib,

use SUMIF

x = Application.SUMIF(rng, Cells(K, J).Value, rng_to_sum)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"HSalim[MVP]" wrote in message
...
Hi,
I have this line in my code
x = Application.VLookup(Cells(K, J).Value, rng, 4,
False)
Till recently,this was good - it was alwas a one to one/none match

Now it has become a one to Many so I need to change it to be a sum
I need the approximate equivalent of
Application.DSUM( rng, "QTY", "ItemNmbr = " & Cells(K,
J).Value)
This statement returns error 2015.

How can I get this to work?


Thanks in advance for your assistance
Regrds
Habib





--
www.DynExtra.com
A resource for the Microsoft Dynamics Community
Featuring FAQs, File Exchange and more
Current member count: 40
--------------------------------------------
Share your knowledge. Add your favorite questions and answers
Help add questions to this site! We want Your input.
--------------------------------------------