Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear Helper,
I have the following script to add a formular to a cell in all the sheets in Workbook(final_bk) and copy down to the last used cells in the respective sheet. The script stop at vLookup line, how should I set the formula ? For Each sh In Workbooks(final_bk).Worksheets sh.Activate If sh.Name < "Summary" Then ActiveSheet.UsedRange.Select numcolumns = Selection.Columns.Count numRows = Selection.Rows.Count Cells(2, numcolumns + 1).Formula = "=IF(A2<"",VLOOKUP(A2,[WORKBOOKS(source_book)]sheets("Source")!$A:$B,2,false)" Cells(2, numcolumns + 1).AutoFill Destination:=Range("") Columns(numcolumns + 1).Copy Columns(numcolumns + 1).PasteSpecial Paste:=xlPasteValues, _ Operation:=xlNone, SkipBlanks:=False, Transpose:=False End If Next sh |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I combine a VLOOKUP formula and a NETWORKDAYS formula? | Excel Worksheet Functions | |||
Alternative formula to the vlookup formula? | Excel Worksheet Functions | |||
convert vlookup formula to link formula | Excel Worksheet Functions | |||
Excel 2002 VLOOKUP formula or other formula | Excel Discussion (Misc queries) | |||
VLookup Formula | Excel Worksheet Functions |