Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want the following formula in a cell in colum L by using a macro.
=IF(J6="bill",SUM(INDIRECT(SUBSTITUTE(C6,"/","_"))),VLOOKUP(C6,stock,5,FALSE)) Here is my code used in VBA: Activecell.Formula = "=IF(" & ACTIVECELL.OFFSET(0,-2).ADDRESS & "=" & ""bill"" & ",SUM(INDIRECT(SUBSTITUTE(C6," & ""/"" & "," & ""_"" & "))),VLOOKUP(" & ACTIVECELL.OFFSET(0,-9).ADDRESS & ",stock,5,FALSE))" My problem is that at the ""BILL"" vba gives an error "expected: End of statement" Where am i missing the point? Thx |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
char(10) and double quotes | Excel Worksheet Functions | |||
Double Quotes | New Users to Excel | |||
Double Quotes | Excel Discussion (Misc queries) | |||
Double Quotes | Excel Programming | |||
Double Quotes | Excel Programming |