Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vba 复制并粘贴公式结果作为值_Vba_Excel_Excel Formula_Formula - Fatal编程技术网

Vba 复制并粘贴公式结果作为值

Vba 复制并粘贴公式结果作为值,vba,excel,excel-formula,formula,Vba,Excel,Excel Formula,Formula,我想知道是否能够将下面公式的结果粘贴到VBA中的值中。我想从临时工作簿中复制公式,并将其粘贴到另一个工作簿中 =左侧(C32,搜索(“发票”,C32,1)-1)是。这里有一个例子 Range("A32").Formula = "=LEFT(C32,SEARCH(""invoice"",C32,1)-1)" Range("A32").Value = Range("A32").Value '~~> This will convert the formula into value

我想知道是否能够将下面公式的结果粘贴到VBA中的值中。我想从临时工作簿中复制公式,并将其粘贴到另一个工作簿中


=左侧(C32,搜索(“发票”,C32,1)-1)

是。这里有一个例子

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