![]() |
#1
|
|||
|
|||
![]()
Not sure what I'm doing wrong here. I get object defined error on the line "icell.Offset(0, 5).Value = fullpath & colRef & lookrow"
I can print the concatenate results and look at it in a msgbox, but it will not let me inset the value in the "iCell offset." This is the secton from a larger section of code that is giving me the problem: Sub test() Dim icell As Range Dim fullpath, colRef, lookrow As String Dim lrow As Long lrow = Cells(Rows.Count, 2).End(xlUp).Row For Each icell In Range(Cells(4, 3), Cells(lrow, 3)) lookUp = icell & icell.Offset(0, 2) & icell.Offset(0, 3) If IsError(Application.WorksheetFunction.VLookup(look Up, refTable, 5, 0)) Then Else lookrow = Application.WorksheetFunction.VLookup(lookUp, refTable, 5, 0) Budg_Add = fullpath & colRef & lookrow MsgBox Budg_Add icell.Offset(0, 5).Value = fullpath & colRef & lookrow End If Next icell End Sub For what it's worth, the end result is a link to a cell in another file. |
#2
|
|||
|
|||
![]()
I figured it out. The name to the other file was missing the closing bracket "]". DUH!
|
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
gsrikanth | Excel Programming | 2 | 03-28-2022 06:32 AM |
![]() |
bennyamy | Excel Programming | 4 | 03-23-2017 11:42 AM |
![]() |
tinfanide | Excel Programming | 2 | 06-09-2012 10:19 AM |
![]() |
Manit | Excel Programming | 4 | 12-08-2011 07:35 PM |
TOC printing Error Bookmark not Defined | techexpressinc | Word | 0 | 12-14-2008 05:24 PM |