Solved

Match Index Formula?

Posted on 2012-03-14
5
191 Views
Last Modified: 2012-08-14
I have a table which I download from Access on a regular basis in which the columns may change.

I want to assign the "P" values underneath the correct column in a static table in Excel.

Please see attched example
Book1.xls
0
Comment
Question by:fitaliano
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 37720924
You can enter this formula in B10 and copy down and across

=IFERROR(IF(INDEX($B$3:$F$5,MATCH($A18,$A$3:$A$5,0),MATCH(B$17,$B$2:$F$2,0))="","",INDEX($B$3:$F$5,MATCH($A18,$A$3:$A$5,0),MATCH(B$17,$B$2:$F$2,0))),"")
0
 
LVL 42

Expert Comment

by:dlmille
ID: 37721101
If your data is numeric, then we can use this:

[B10]=SUMPRODUCT(($B$3:$F$5)*($B$2:$F$2=B$9)*($A$3:$A$5=$A14))
Copy down and across

However, this will result in Zero at intersections that don't exist.  of course, you could put an IF statement around it to turn it to blank if not found.

=IF(equation=0,"",equation)

See attached.

Dave
Book1.xls
0
 
LVL 42

Expert Comment

by:dlmille
ID: 37721138
If the data is not numeric, then the INDEX/MATCH approach works fine:

[B10]=IF(ISERROR(INDEX($B$3:$F$5,MATCH($A10,$A$3:$A$5,0),MATCH(B$9,$B$2:$F$2,0))),"",INDEX($B$3:$F$5,MATCH($A10,$A$3:$A$5,0),MATCH(B$9,$B$2:$F$2,0)))

And if you want blanks to appear as blank on the MATCH condition (e.g., if no P is there, you want blank, not zero), then use this:
[b10]=IF(OR(ISERROR(MATCH($A10,$A$3:$A$5,0)),ISERROR(MATCH(B$9,$B$2:$F$2,0))),"",IF(INDEX($B$3:$F$5,MATCH($A10,$A$3:$A$5,0),MATCH(B$9,$B$2:$F$2,0))=0,"",INDEX($B$3:$F$5,MATCH($A10,$A$3:$A$5,0),MATCH(B$9,$B$2:$F$2,0))))

Copy down and across.

See attached.

Dave
Book1.xls
0
 

Author Comment

by:fitaliano
ID: 37721140
It is not working for me, can you put it in the Excel file?
0
 
LVL 42

Accepted Solution

by:
dlmille earned 500 total points
ID: 37721158
@fitaliano - I posted my examples in attached workbooks.  Start with my last post, which works with non-numeric and blank if blank is found.

Dave
0

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

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

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

736 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