Having trouble with INDEX and MATCH

smidge

New Member
Joined
Nov 28, 2005
Messages
5
Hi everyone,

I have a workbook that I use to track orders for the company I work for. I have been using the INDEX and MATCH formulas to look up invoice numbers and match them to order numbers. Somehow it got messed up and I'm having trouble fixing it.

Here is the formula:
=INDEX(inv!$A$2:$B$8000,(MATCH(B11,inv!$B:$B,FALSE))+inv!$A:$A,(MATCH(B11,inv!$B:$B,FALSE))+inv!$A:$A)

But instead of returning the invoice formula like I was hoping, I get the #REF! error.

When I open the builder for the formula, everything seems to be working, so I dont understand why it's not populating.

formula.jpg


If you have any idea why I'm getting this error and how I could fix it I would appreciate it!

Holly[/img]
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
I just noticed the picture is really small. I just wanted to put it there so you could see that all three lines are producing a result. I'm just not getting one in the actual cell.

Thanks again
 
Upvote 0
smidge said:
I'm getting the error without that part too.

Yes, you will. I just pointed out the most obvious error in the formula you posted. Would you post the data from A2:B10 including headers if any?
 
Upvote 0
Example data:

Invoice Number Order Number
5213468 2A89Q7
5213469 2A89Q9
5213470 2A89R3
5213471 2A89R4
5213472 2A89R5
5213473 2A89R7
5213474 2A89R8
5213475 2A89R9
5213476 2A89S0
5213477 2A89S2

The headers are in A1 and B1.
 
Upvote 0
smidge said:
Example data:

Invoice Number Order Number
5213468 2A89Q7
5213469 2A89Q9
5213470 2A89R3
5213471 2A89R4
5213472 2A89R5
5213473 2A89R7
5213474 2A89R8
5213475 2A89R9
5213476 2A89S0
5213477 2A89S2

The headers are in A1 and B1.
Book5
ABCDEFG
1Invoice#Order#Sorted DataUnsorted Data
252134682A89Q7InvoiceOrderOrder
352134692A89Q952134712A89R42A89R4
452134702A89R35213486Not Found#N/A
552134712A89R4
652134722A89R5
752134732A89R7
852134742A89R8OrderInvoice
952134752A89R92A89R75213473
1052134762A89S0
1152134772A89S2
12
Sheet1


Look for Invoice# and retrieve the assciated Order#.

For sorted table:

F3:

=IF(LOOKUP(E3,$A$2:$A$11)=E3,LOOKUP(E3,$A$2:$B$11),"Not Found")

For unsorted table:

G3:

=INDEX($B$2:$B$11,MATCH(E3,$A$2:$A$11,0))

Look for Order# and retrieve the associated Invoice#.

For unsorted table:

F9:

=INDEX($A$2:$A$11,MATCH(E9,$B$2:$B$11,0))
 
Upvote 0

Forum statistics

Threads
1,203,760
Messages
6,057,210
Members
444,914
Latest member
Mamun12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top