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
|