How to convert a String to a Range Object

后端 未结 6 1523
名媛妹妹
名媛妹妹 2021-01-23 22:44

Is there anyway to convert a string value to a Range object ? I\'m having a function which takes a Range object as a argument and need to pass a single string parameter to it

6条回答
  •  广开言路
    2021-01-23 23:18

    This simple function will convert string arguments into a range object, usable in other excel functions.

    Function TXT2RNG(text) As Variant
    
    Set TXT2RNG = Range(text)
    
    End Function
    

提交回复
热议问题