How can I convert a range to a string (VBA)?

后端 未结 8 434
故里飘歌
故里飘歌 2020-12-10 20:38

What is the best way to convert a range of cells to a string? I have a function that only takes a string as input so I need to convert the range to a string, while retaining

8条回答
  •  执笔经年
    2020-12-10 21:22

    There is a much easier way. Assuming the variable rng is a range, then writing:

    rng = Left(rng,Len(rng))

    will miraculously turn rng into a string.

提交回复
热议问题