ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   vlookup or match function across worksheets (x-post - sorry) (https://www.excelbanter.com/excel-programming/406646-vlookup-match-function-across-worksheets-x-post-sorry.html)

Ant[_4_]

vlookup or match function across worksheets (x-post - sorry)
 
For example I have 15 worksheets in an excel workbook named A through
N. I am looking for the values in worksheet A, Cell A1 (through
A250) across worksheets B through N and return the worksheet name
that the value exists in. (Worksheet C for example) The first or any
exact match is fine. If it doesn't exist #N/A is also fine I can work
with the errors returned myself.

Is this possible? If the worksheet name is too difficult then any
valid result (complete path to cell?) is sufficient.

Thank you in advance

(Very sorry for the cross / double post) I feel I might have used the
incorrect group the first time (Not exactly a .MISC)

joel

vlookup or match function across worksheets (x-post - sorry)
 
SearchValue = "ABC"
Found = False
for each sht in thisworkbook.sheets
if sht.name < "A" then
with thisworkbook.sheets("A")
set c = .Range("A1:A250").find(what:=SearchValue, _
lookin:=xlvalues,lookat:xlwhole)
if not c is nothing then
msgbox("Found in sheet: " & sht.name)
end if
end with
end if

next sht

"Ant" wrote:

For example I have 15 worksheets in an excel workbook named A through
N. I am looking for the values in worksheet A, Cell A1 (through
A250) across worksheets B through N and return the worksheet name
that the value exists in. (Worksheet C for example) The first or any
exact match is fine. If it doesn't exist #N/A is also fine I can work
with the errors returned myself.

Is this possible? If the worksheet name is too difficult then any
valid result (complete path to cell?) is sufficient.

Thank you in advance

(Very sorry for the cross / double post) I feel I might have used the
incorrect group the first time (Not exactly a .MISC)


Herbert Seidenberg

vlookup or match function across worksheets (x-post - sorry)
 
For a macro that has no typos
and has been tested,
see your other post.


All times are GMT +1. The time now is 06:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com