Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Jose Hughes   on Aug 15 In MS Office Category.

  
Question Answered By: Poppy Brown   on Aug 15

Maybe you have something else in mind...

But this is what I tried with no luck:

Sub Macro3()
Dim RngOut As Range

Set RngOut = Application.Union(Sheets("QueryRanges").Range
("D2:F2"), Sheets("QueryRanges").Range("D6:F6"))

MsgBox Application.WorksheetFunction.DSum(Sheets("Data2").Range
("A1:DE30063"), Sheets("Data2").Range("CP1"), RngOut)

End Sub

I got an "unable to get DSum property of worksheetfunction class"
error.

If I try to select a cell and paste RngOut I get an error that says
something about function not available with multiple selections.

Am I missing something?

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Range question for DSUM, DCOUNT, etc... Or get search suggestion and latest updates.


Tagged: