【发布时间】:2014-09-29 06:19:10
【问题描述】:
如何从包含另一个范围的偏移量的函数中返回一个范围?
这是我的代码(函数):
Private Function ProcessRange(rng) As Range
If rng <> "A1" Then
ProcessRange = Range(rng).Offset(r + 2) //this is the problem
Else
ProcessRange = Range("A1")
End If
End Function
从上面的示例中,我尝试替换偏移函数的范围。有可能吗?
【问题讨论】:
-
你在用你的代码做什么?你知道函数和变量吗?
-
我试图为rng传递的参数只是一个字符串,A1,B2等