开发者

Excel macro - adding a word to a currency field

开发者 https://www.devze.com 2023-02-22 09:09 出处:网络
I\'ve successfully copied a currency value to a field. Now I n开发者_运维百科eed to add a word, but this always makes me lose my currency format. Is there a way to solve this?

I've successfully copied a currency value to a field. Now I n开发者_运维百科eed to add a word, but this always makes me lose my currency format. Is there a way to solve this?

Example

Range("A2").Value = Range("A1") & "/link"
"Output"
A1 = € 2.800,00
A2 = 2800/link
"Wanted output"
A2 = € 2.800,00/link

I know I can record a macro and copy that, but that's only applicable for that certain case. The number is variable.

Thank you for your help.


Range("A2").Value = Range("A1").Text & "/link"
0

精彩评论

暂无评论...
验证码 换一张
取 消