Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Heath Williams   on Feb 09 In MS Office Category.

  
Question Answered By: Patricia Johnson   on Feb 09

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: