Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Zak Zak is offline
external usenet poster
 
Posts: 144
Default Lookup in numerous sheets

I got this sample code from a website, i tried to use it for my needs but it
does not work. This code stops at the first event of finding something that
matches.. id like excel to continue looking and gather all results and put
them in 1 new sheet. how can i modify the code to do what i want i to?

I am looking up column C in a master sheet into another workbook with 15
sheets, I will be looking up the same column in each sheet, for example,
column c in master sheet will be looked into column c of each of the 15
sheets, it doesnt need to return anything additional other than whether it
appears in any of the sheets, so if i was writing a vlookup it would end with
'1,false'. And ideally the results will be displayed on a new sheet.

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

Thanks a lot for all your help.
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
how do i sum the same cell in numerous sheets behind a main njparamedic Excel Worksheet Functions 2 May 14th 09 02:27 PM
return same cell value from numerous sheets Laurie Excel Worksheet Functions 5 April 11th 08 02:19 PM
how to lookup in numerous different sheets Zak Excel Discussion (Misc queries) 6 January 11th 08 12:24 PM
Comparing numerous sheets Zak Excel Discussion (Misc queries) 5 January 10th 08 09:57 PM
propogating cells with data from numerous sheets G. Beard Excel Programming 0 October 4th 05 12:01 AM


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

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"