Copy and paste formula result as value

旧城冷巷雨未停 提交于 2020-01-16 05:55:49

问题


I wanted to know if able to paste the result of the formula below into a value in VBA. I would like to copy the formula from my temporary workbook and paste it in another workbook.

=LEFT(C32,SEARCH("invoice",C32,1)-1)


回答1:


Yes. Here is an example

Range("A32").Formula = "=LEFT(C32,SEARCH(""invoice"",C32,1)-1)"
Range("A32").Value = Range("A32").Value '~~> This will convert the formula into value


来源:https://stackoverflow.com/questions/20119277/copy-and-paste-formula-result-as-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!