Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can't fill XL Formula in VBA
I have the following formula that works fine as long as I manually fil
down on the sheet: =IF(ISNA(VLOOKUP(A9,$P$8:$Q$94,2,FALSE)),"",VLOOKU P(A9,$P$8:$Q$94,2,FALSE)) When I put the code into VBA it compiles but hangs up when run. Th VBA code is: Range("K8").Select ActiveCell.FormulaR1C1 "=IF(ISNA(VLOOKUP(A9,$P$8:$Q$94,2,FALSE)),"",VLOOK UP(A9,$P$8:$Q$94,2,FALSE))" Selection.AutoFill Destination:=Range("K8:K153") Type:=xlFillDefault I get a "run time error '1004', Application-defined or object-define error." Hitting debug the editor jumps to my "ActiveCell line abov suggesting the error is in the formula. What gives? Any help is appreciated. Lift Of -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Fill Formula please | Excel Worksheet Functions | |||
formula fill down | Excel Discussion (Misc queries) | |||
Fill Down formula Help Please | Excel Discussion (Misc queries) | |||
Help with formula fill down | Excel Discussion (Misc queries) | |||
Using VB to fill a formula down | Excel Programming |