Solved

LOOKUP, INDEX, MATCH, MAX?

Posted on 2013-05-16
12
306 Views
Last Modified: 2013-05-21
I have been tasked with seeing if I can pull column header info into a report. The report uses a series of lookups to pull information from two different sources.   The lookup value is in column B,  table array is B:O. My challenges is that I need to look at columns j-o by row and find the column with the last value and return the column header value, is this possible?
Sample-Level.xlsx
0
Comment
Question by:jmac001
  • 6
  • 6
12 Comments
 
LVL 23

Expert Comment

by:NBVC
ID: 39171527
Try:

=IFERROR(INDEX($C$2:$H$2,MATCH(10^10,$C3:$H3)),0)

copied down.

Adjust ranges to suit.
0
 

Author Comment

by:jmac001
ID: 39171755
I apologize for not being clear the information is located in a different workbook. Is it still possible to do with Index/Match?
0
 
LVL 23

Expert Comment

by:NBVC
ID: 39171814
Yes, just add the paths
e.g

=IFERROR(INDEX('[Sample-Level.xlsx]Sheet1'!$C$2:$H$2,MATCH(10^10,'[Sample-Level.xlsx]Sheet1'!$C3:$H3)),0)
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:jmac001
ID: 39172903
Can you please explain what 10^10 does.  Thanks
0
 
LVL 23

Expert Comment

by:NBVC
ID: 39173545
It's a very large number. Match() without the third argument looks for the largest match that is smaller than the, LOOKUP value which you should 10^10.  so the last number that is smaller in each row is the last number in the row always.
0
 

Author Comment

by:jmac001
ID: 39175044
Thanks, question how does it match back and return the data to the appropriate cell if a lookup is not being used.  The forumla is working but the data is not aligned to the correct project?
0
 
LVL 23

Expert Comment

by:NBVC
ID: 39175238
So you are saying you want to match up the store too, which may not be in same order?  

If so,

=IFERROR(INDEX('[Sample-Level.xlsx]Sheet1'!$C$1:$H$1,MATCH(10^10,INDEX('[Sample-Level.xlsx]Sheet1'!$C$2:$H$10,MATCH(A2,'[Sample-Level.xlsx]Sheet1'!$A$2:$A$10,0),0))),"")

where it is assumed the table is in '[Sample-Level.xlsx]Sheet1'!$C$1:$H$10 and the Store you want to look up is in A2 of your active (formula) sheet.
0
 

Author Comment

by:jmac001
ID: 39182307
Updated know I am getting all zeros.
0
 
LVL 23

Expert Comment

by:NBVC
ID: 39184085
See attached.

I put the formula in Sheet2., but you can CUT (not Copy) and Paste in another workbook, and it should update, you may need to just change the A2 in the formula to coincide to where the Store you want to lookup is in that workbook.

Also you will need to adjust the ranges if they are really larger than to row 9;
Copy-of-Sample-Level-1.xlsx
0
 

Author Comment

by:jmac001
ID: 39184357
I am getting mixed results, some rows are pulling the correct level and others are not.
Test-Cost-Variance.xlsx
Test-Forecast.xls
0
 
LVL 23

Accepted Solution

by:
NBVC earned 500 total points
ID: 39185280
Your ranges didn't start and end at same row number.

Try:

=IFERROR(INDEX('[Test-Forecast.xls]Forecast Summary'!$J$1:$O$1,MATCH(10^10,INDEX('[Test-Forecast.xls]Forecast Summary'!$J$3:$O$175,MATCH(B3,'[Test-Forecast.xls]Forecast Summary'!$B$3:$B$175,0),0))),"")
0
 

Author Closing Comment

by:jmac001
ID: 39185619
Thank you so much I did adjust, but only to 2 didn't go far enough/
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Make a Cell act like a Date 7 38
remove dups 10 36
Excel Spacing Anomaly 4 23
macro modification Column C 14 26
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
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…

770 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