ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   why I got error value after running this code? (https://www.excelbanter.com/excel-programming/353802-why-i-got-error-value-after-running-code.html)

Bao Guangya

why I got error value after running this code?
 
dim cnum1,cnum0

cnum1 = 6
cnum0 = 3
cells(2,3).formula = "=vlookup(A2,sheet1!C:F,cnum1 - cnum0 + 1,0)"



Bob Phillips[_6_]

why I got error value after running this code?
 
cells(2,3).formula = "=vlookup(A2,sheet1!C:F," & cnum1 - cnum0 + 1 & ",0)"


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Bao Guangya" wrote in message
...
dim cnum1,cnum0

cnum1 = 6
cnum0 = 3
cells(2,3).formula = "=vlookup(A2,sheet1!C:F,cnum1 - cnum0 + 1,0)"






All times are GMT +1. The time now is 03:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com