Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Vlookup thru many books

\\hi guys,

\\i have this piece of code to make vlookup work thru a work book. I'm
trying to make it go thru different work books. let say i have 2 o 3
workbooks open, i wan to to be able to tell a cell:

vlookallbooks(j2,c:h,2,false) and for it to look in that range of all
open excel books.

any suggestions ???

thnx

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Vlookup thru many books

On Oct 8, 2:08 pm, Sangel wrote:
\\hi guys,

\\i have this piece of code to make vlookup work thru a work book. I'm
trying to make it go thru different work books. let say i have 2 o 3
workbooks open, i wan to to be able to tell a cell:

vlookallbooks(j2,c:h,2,false) and for it to look in that range of all
open excel books.

any suggestions ???

thnx


sorry i didnt inclide the code..


Function vlookallsheets(Look_Value As Variant, Tble_Array As Range, _
Col_num As Integer, Optional Range_look As
Boolean)


'Use VLOOKUP to Look across ALL Worksheets and stops _
at the first match found.
'''''''''''''''''''''''''''''''''''''''''''''''''
Dim wSheet As Worksheet
Dim vFound

On Error Resume Next


For Each wSheet In ActiveWorkbook.Worksheets
With wSheet
Set Tble_Array = .Range(Tble_Array.Address)
vFound = WorksheetFunction.VLookup _
(Look_Value, Tble_Array, _
Col_num, Range_look)
End With
If Not IsEmpty(vFound) Then Exit For
Next wSheet
Set Tble_Array = Nothing
vlookallsheets = vFound

End Function

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
which books..? Roy New Users to Excel 3 October 15th 06 09:41 AM
VBA-Books Looney Excel Programming 2 March 15th 06 02:19 AM
Books Big Dov Excel Programming 1 August 23rd 05 09:44 PM
Books on VBA Cabaco Excel Programming 3 April 5th 05 05:27 PM
Books lc Excel Programming 2 November 10th 03 09:27 PM


All times are GMT +1. The time now is 10:52 AM.

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

About Us

"It's about Microsoft Excel"