[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Match formula

Posted on 2014-07-15
9
Medium Priority
?
190 Views
Last Modified: 2014-07-17
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
0
Comment
Question by:Seamus2626
9 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40196377
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
 

Author Comment

by:Seamus2626
ID: 40196389
Thanks guty, im a gettig a syntax error on that one
0
 
LVL 8

Expert Comment

by:Naresh Patel
ID: 40196398
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 23

Assisted Solution

by:NBVC
NBVC earned 2000 total points
ID: 40197001
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
 

Author Comment

by:Seamus2626
ID: 40197166
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
 
LVL 23

Expert Comment

by:NBVC
ID: 40197263
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
 

Author Comment

by:Seamus2626
ID: 40197280
I actually switched them over, but its still returning all "No PCM FOUND" !!
0
 
LVL 23

Accepted Solution

by:
NBVC earned 2000 total points
ID: 40197417
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
 

Author Closing Comment

by:Seamus2626
ID: 40201473
All sorted guys, i used a vlookup in the end, thanks!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question