Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I want to repeat this vlookup in 3 sheets and 11 files. I am tryng also the vlookup bring some number from other file, and I have problems with the code. Thanks Sub Vlookupsheets() With Sheets("sheet2") If IsEmpty(.Cells(.Rows.Count, 1)) Then Set rngResults = .Range(.Cells(7, 13), _ .Cells(.Rows.Count, 1).End(xlUp).Offset(0, 12)) Else: Set rngResults = .Range(.Cells(7, 13), _ .Cells(.Rows.Count, 14)) End If Set rngLookupValue = .Cells(7, 1) End With With rngResults .Formula = "=IF(ISNA(VLOOKUP(" & _ rngLookupValue.Address(False, False) & _ ",Plano!A&P plano!A:N,14,FALSE)),2,VLOOKUP(" & _ rngLookupValue.Address(False, False) & _ ",Plano!A&P plano!A:N,14,FALSE))" .Value = .Value End With End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sheets in a workbooks | Excel Discussion (Misc queries) | |||
Linking sheets between workbooks... | Links and Linking in Excel | |||
Copying Sheets to New workbooks | Excel Programming | |||
ShowAllData in all workbooks and sheets | Excel Programming | |||
Combine Sheets From Different Workbooks | Excel Programming |