Match formula

Hi,

I need need formula in cell AR2 that looks at the entry in AQ2, and looks that up against Col P in another workbook named "MappingTable.xls", and when a match is found returns the entry in Col G of "Mapping Table.xls", if no match is found, it should return "No PCM found"

Many thanks
Seamus2626Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
if it was in the same workbook, this is the approach, in cel

=IF(ISNA(MATCH(AQ2;P:P;0));"No PCM found";OFFSET(G$1;MATCH(AQ2;P:P;0)-1;0))

for the data being in the other workbook:


=IF(ISNA(MATCH(AQ2;'[MappingTable.xls]Sheet1'!P:P;0));"No PCM found";OFFSET('[MappingTable.xls]Sheet1'!G$1;MATCH(AQ2;'[MappingTable.xls]Sheet1'!P:P;0)-1;0))
0
Seamus2626Author Commented:
Thanks guty, im a gettig a syntax error on that one
0
Naresh PatelTraderCommented:
try this

=IF(INDEX('[Mapping Table.xls]Sheet1'!$G:$G,MATCH(AQ2,'[Mapping Table.xls]Sheet1'!$P:$P,0))=0,"No PCM Found",INDEX('[Mapping Table.xls]Sheet1'!$G:$G,MATCH(AQ2,'[Mapping Table.xls]Sheet1'!$P:$P,0)))
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

NBVCCommented:
OR (while other book is open):

=IFERROR(INDEX('[MappingTable.xls]Sheet1'!P:P,MATCH(AQ2,'[MappingTable.xls]Sheet1'!G:G,0)),"No PCM FOUND")

you can then close the other workbook, if desired.
0
Seamus2626Author Commented:
itjockey: Your formula returns all #NA
NBVC; Your formula returns all "No PCM FOUND"

I am currently ussng a vlookup, where i have shifted the columns about, so to work a vlookup, but would prefer match formula - please note below is in VBA notation

=IFERROR(IF(VLOOKUP(A2,'[MappingTable.xlsm]GBM Mapping Table v4'!$B:$F,5,0)=0,""No Sub sector found"",VLOOKUP(A2,'[MappingTable.xlsm]GBM Mapping Table v4'!$B:$F,5,0)),""No Sub Sector found"")"


Thanks
0
NBVCCommented:
oops... I might have switched the references... try:

=IFERROR(INDEX('[MappingTable.xls]Sheet1'!G:G,MATCH(AQ2,'[MappingTable.xls]Sheet1'!P:P,0)),"No PCM FOUND")
0
Seamus2626Author Commented:
I actually switched them over, but its still returning all "No PCM FOUND" !!
0
NBVCCommented:
Are you sure there is an exact match?  Look to see if you have spaces in the "matching cell".  Or are you matching numbers and the formats aren't both the same?  Also make sure the sheetname matches.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Seamus2626Author Commented:
All sorted guys, i used a vlookup in the end, thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.