Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm getting this common error with this code, it looks as if the formula as
causing it, tried assigning formula to a string and directly, no change, let me know if you need more info, thanks in advance Sheets(CFPBEY).Select Range("E11:E20000").ClearContents ColLoc1 = pbeyeydesc - pbeydescchg ColLoc2 = pbeyeydesc - pbeyorigtrdesc Dim test As String test = "=IF(RC[-" & ColLoc1 & "]<0,VLOOKUP(RC[-" & ColLoc1 & "],'" & RT & "'!$A$5:$B$" & _ intUniqueTrDesc & ",2,FALSE),VLOOKUP(RC[-" & ColLoc2 & "],'" & RT & "'!$A$5:$B$" & _ intUniqueTrDesc & ",2,FALSE))" Sheets(CFPBEY).Range(Cells(StartRow, pbeyeydesc), Cells(intNumOfTrDesc + HdrRow, pbeyeydesc)).Formula = test '_ ' "=IF(RC[-" & ColLoc1 & "]<0,VLOOKUP(RC[-" & ColLoc1 & "],'" & RT & "'!$A$5:$B$" & _ ' intUniqueTrDesc & ",2,FALSE),VLOOKUP(RC[-" & ColLoc2 & "],'" & RT & "'!$A$5:$B$" & _ ' intUniqueTrDesc & ",2,FALSE))" |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run time 1004 | Excel Discussion (Misc queries) | |||
run-time error '1004' | Excel Programming | |||
run time error (1004) | Excel Programming | |||
run time error 1004 | Excel Programming | |||
errot in macro | Excel Discussion (Misc queries) |