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?