Using MATCH across multiple sheets / workbooks

thanew

New Member
Joined
Aug 11, 2011
Messages
1
Hello,

Long time lurker, first time poster :)

I'm trying to use MATCH to locate some items in a second sheet (and eventually a second workbook), however I'm running across some issues when attempting to use the following code.

Code:
  v = Application.WorksheetFunction.Match(Sheet2.Cells(y + 3, 2), [I][B][U]Sheets("sheetname").Range("A1:A20")[/U][/B][/I], 0)

This is part of a for loop, y is actually the variable in the loop, so it's increasing each iteration. I'm basically assigning the variable v the result so I can use it later on to write some values to another cell.

The bold, underlined, italicized portion is the area I'm having a problem with. I'm trying to search the second worksheet for something that is listed on the first worksheet. This is actually part of a loop so it will be going through a column on the first sheet and then searching for the same text on the second sheet. The reason I'm using match is because I need coordinates (partial, or otherwise) for the location of the cell that contains the match.

Also, as I said the next part of this is going to be to implement it to search a closed, external document. So if any helpful soul out there could lend a hand on either part it would be greatly appreciated.

-T
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,224,584
Messages
6,179,691
Members
452,938
Latest member
babeneker

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