How to get Excel cell Value in VBA with single quo

2019-07-23 06:29发布

How to get Excel cell Value in VBA with single quote if in the starting of text.

For Eg. Cell A1 has Value '123. I get value 123 only in VBA. I need '123.

标签: excel vba
1条回答
我想做一个坏孩纸
2楼-- · 2019-07-23 07:24

As this answer shows, you can use .PrefixCharacter to get the initial single quote mark (if any), which then be concatenated with the value of the cell:

Range("A1").PrefixCharacter & Range("A1").Value
查看更多
登录 后发表回答