简体   繁体   中英

how to write the formula in excel vba with use of special symbols

Twsht.Cells(Trow + 1, 15).Formula = "=IFERROR(VLOOKUP(M" & Trow + 1 & Chr(38) & "-" & Chr(38) & "N" & Trow + 1 & ",'Table Array'!$A$2:$D$26,4,FALSE)," & Chr(34) & Chr(34) & ")"

Getting below error message "Run-Time error 1004" Application-defined or object-defined error

if i paste below formula directly in cell it working

=IFERROR(VLOOKUP(M604&-N604,'Table Array':$A$2,$D$26,4,FALSE),"")

use:

Twsht.Cells(Trow + 1, 15).Formula = "=IFERROR(VLOOKUP(M" & Trow + 1 & "&-N" & Trow + 1 & ",'Table Array'!$A$2:$D$26,4,FALSE),"""")"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM