PDA

View Full Version : match backwards



benong
09-21-2010, 07:17 PM
hi,
if i use this formulae, it will search the column A downwards to find the itemCode.


matchItem = Application.Match(itemCode, Worksheets(1).Range("A:A"), False)

How can i do it in the reverse order?
I want to search the column A in the backwards order to match the itemCode.
eg.
column A contains many duplicates of itemCode.
Start from A100 to A1, find the first matched itemCode.
Pls advice.

xlbo
09-21-2010, 07:34 PM
easiest way is to resort your column so that the data is reversed
Failing that, what other data is there which could be used to indicate the record you want to return? Are their dates or other elements of data against the multiple item codes that would help to identify which one you want?

I guess I'm saying that the short anser is no - you cannot reverse the direction of the match function but there may be alternatives if you can describe your data layout and what you are trying to achieve

benong
09-22-2010, 01:06 AM
Der xlbo,
many thanks for your advice.
i've decided to use 2 list so that things don't mix up. :)