View Single Post
 
Old 02-26-2015, 10:09 AM
grexcelman grexcelman is offline Windows 7 32bit Office 2003
Novice
 
Join Date: Dec 2014
Posts: 21
grexcelman is on a distinguished road
Question UDF data type errors

Having trouble figuring out how to express this function. The argument I'm entering into the formula is a cell which references the name of the tab that has the range I'm looking to grab data from. Then I'd like to add up the data found in that range as my output from this formula.


Function testnamedrange(DNRange As String) As Variant
Dim rng As Range

Set rng = Range("" & DNRange&, "!$e$17:$p$17")
testnamedrange = "=Sum(rng)"

End Function
Reply With Quote