Vlookup - another way

kizzie37

Well-known Member
Joined
Oct 23, 2007
Messages
585
Office Version
  1. 365
Hi

I need to know if perhaps this is possible through either a v lookup or a Match/index

I have values in column A (say 44403) I want to look this number up (an return a value in a later column), the catch being that there are 10 pages within the workbook that may have it listed (only once though). It will always be located in the first column of the page.

I have only ever used lookups and matches for a singular databse, never potentialy 10 or more on different pages.

Does anyone have any ideas or suggestions if its odable?.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi

I need to know if perhaps this is possible through either a v lookup or a Match/index

I have values in column A (say 44403) I want to look this number up (an return a value in a later column), the catch being that there are 10 pages within the workbook that may have it listed (only once though). It will always be located in the first column of the page.

I have only ever used lookups and matches for a singular databse, never potentialy 10 or more on different pages.

Does anyone have any ideas or suggestions if its odable?.

What would be the formula if you just had one page, and what result is expected to obtain - text or a number?
 
Upvote 0
Thanks, solved it


used OZ grid:

Function VLOOKAllSheets(Look_Value As Variant, Tble_Array As Range, _

Col_num as Integer, Optional Range_look as Boolean)



''''''''''''''''''''''''''''''''''''''''''''''''

'Written by OzGrid.com



'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
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,894
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top