标签: function vba excel-vba formula excel
您如何将此公式=LEFT(A1,SEARCH("invoice",A1,1)-1)放入VBA中,因此此公式将放在临时工作簿单元格中?
=LEFT(A1,SEARCH("invoice",A1,1)-1)
答案 0 :(得分:0)
喜欢这个?
Dim oBook as Excel.workbook set oBook = workbooks.add oBook.sheets(1).range("B1").formula = "=LEFT(A1,SEARCH(""invoice"",A1,1)-1)" oBook.close