Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following code inserts #VALUE when I attempt to use the
Application.Vlookup function. If I mouse over the Cells(dRow, dCol) I see error 2015 in the pop-up box. I am using Excel 2002. Any idea what is wrong ? Thanks in advance Sal Sub CreateReport() 'Declare variables Dim strFile As String Dim wkbCode As Workbook Dim wkbReport As Workbook Dim wksCustom As Worksheet Dim dCol As Double Dim dRow As Double Dim tmpString As String Dim tmpRange As String Set wkbCode = ThisWorkbook 'Let user choose workbook to open strFile = Application.GetOpenFilename _ ("Text Files (*.txt),*.txt, Excel Files (*.xls), *.xls", 2) If strFile < "False" Then Set wkbReport = Workbooks.Open(strFile) End If 'Display message at bottom of screen Application.StatusBar = "Creating the report..." 'Delete "Category" column dCol = Application.Match("Category", Rows(1), 0) If Not IsError(dCol) Then Columns(dCol).Delete End If 'Insert "Manager" column between "Status" and "Caller" columns dCol = Application.Match("Caller", Rows(1), 0) If Not IsError(dCol) Then Columns(dCol).Insert End If Cells(1, dCol) = "Manager" 'look up area manager and insert into "Area Mgr" column Application.EnableEvents = False tmpRange = "[TicketReport.xls]tmp!$I$6:$J$38" For dRow = 2 To 100 tmpString = Cells(dRow, dCol + 1) Cells(dRow, dCol) = Application.VLookup(tmpString, tmpRange, 2, False) Next dRow Application.EnableEvents = True |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Incorporate adjacent cells after performing a VLOOKUP | Excel Discussion (Misc queries) | |||
why does excel 2007 subtract 2009 from 2015 = 1900? | Excel Worksheet Functions | |||
Error 2015 | Excel Programming | |||
Error 2015 from ConvertFormula | Excel Programming | |||
How to avoid error 2015 when using ActiveCell.Offsett in own function | Excel Programming |