Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Vlookup in different sheets and workbooks

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sheets in a workbooks kanwal Excel Discussion (Misc queries) 3 January 20th 07 03:24 AM
Linking sheets between workbooks... Chris Links and Linking in Excel 12 June 28th 05 02:27 PM
Copying Sheets to New workbooks Andibevan[_2_] Excel Programming 2 April 29th 05 04:32 PM
ShowAllData in all workbooks and sheets Robert Christie[_3_] Excel Programming 2 January 29th 05 03:29 PM
Combine Sheets From Different Workbooks Tim Fortune Excel Programming 4 January 17th 04 11:31 PM


All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"