Solved

Index & Match in Excel

Posted on 2016-11-08
11
40 Views
Last Modified: 2016-11-09
I am trying to use Index and Match to lookup a value in my worksheet but I'm having trouble getting the formula to work correctly. Here's the scenario

Column F is the lookup column that I want to return the value from.

Column B is the first column that I need to match up exactly to my value in cell L6. The next column is Column C and I need to have the value in cell M6 be greater than or equal to column C.

This is what I have so far and it works but only if the value in column C is exact. I need it to be modified to say it either equals the value or is greater than the value in column C.


{=INDEX('Raw Matl-CT'!$F$6:$F$200,MATCH(1,('Quote Pricing Calculator'!$L$6='Raw Matl-CT'!$B$6:$B$200)*('Quote Pricing Calculator'!$M$6='Raw Matl-CT'!$C$6:$C$200),0))}

Open in new window


Column B            Column C            Column F

303                       .1250                    $1.00
303                       .1300                    $2.00
303                       .1310                    $3.00
303                       .1875                    $4.00
303                       .2500                    $5.00
303                       .3750                    $6.00


Value in Cell L6 = 303
Value in Cell M6 = .3125

The value that should be returned in the above example should be: $5.00 since the value in M6 is greater than .2500
0
Comment
Question by:Lawrence Salvucci
  • 6
  • 2
  • 2
  • +1
11 Comments
 
LVL 49

Assisted Solution

by:Rgonzo1971
Rgonzo1971 earned 250 total points
ID: 41879109
HI,
pls try as an array formula (Ctrl-Shift-Enter)

=INDEX('Raw Matl-CT'!$F$6:$F$200,MATCH('Quote Pricing Calculator'!$M$6,--(('Quote Pricing Calculator'!$L$6='Raw Matl-CT'!$B$6:$B$200)*('Raw Matl-CT'!$C$6:$C$200)),1))

Open in new window

Regards
0
 
LVL 1

Author Comment

by:Lawrence Salvucci
ID: 41879117
That didn't work. No matter what value I put in M6 the value in the cell where the formula is doesn't change. It's picking a value that isn't even close to the row it should be returning.
0
 
LVL 21

Assisted Solution

by:Ejgil Hedegaard
Ejgil Hedegaard earned 250 total points
ID: 41879227
Try this

=INDEX('Raw Matl-CT'!$F$6:$F$200,COUNTIFS('Raw Matl-CT'!$B$6:$B$200,'Quote Pricing Calculator'!$L$6,'Raw Matl-CT'!$C$6:$C$200,"<"&'Quote Pricing Calculator'!$M$6),1)

Open in new window

0
 
LVL 1

Author Comment

by:Lawrence Salvucci
ID: 41879248
Nope. Same issue. It just grabs a value not even close and then doesn't change no matter what I enter in M6 for a value.
0
 
LVL 1

Author Comment

by:Lawrence Salvucci
ID: 41879283
Here is a sample of the file. The last formula posted is what I have in my cell R6
Sample.xlsx
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 21

Accepted Solution

by:
Ejgil Hedegaard earned 250 total points
ID: 41879479
Check attached
Sample1.xlsx
0
 
LVL 1

Author Comment

by:Lawrence Salvucci
ID: 41879823
It seems to work somewhat but when you put .2500 in it the price should be $3.01 but it's showing it as $3.53. It should be equal to or greater to the value in column C.
0
 
LVL 3

Expert Comment

by:AL_XResearch
ID: 41880090
Try the following:
=INDEX(F2:F7,MATCH(1,INDEX((B2:B7=L6)*(C2:C7>=M6),0),0),1)

Open in new window

0
 
LVL 1

Author Closing Comment

by:Lawrence Salvucci
ID: 41880339
I just modified your sample file to add = to the last match and it works fine. It needed to be equal to OR greater than. Thanks for the help!
0
 
LVL 3

Expert Comment

by:AL_XResearch
ID: 41880347
Lawrence: You could also try mine. Simpler and includes EQUAL OR.
0
 
LVL 1

Author Comment

by:Lawrence Salvucci
ID: 41880713
Sorry, I didn't see yours till just now. I will test yours and post back.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now