Index Match Query returning incorrect value

trish123

Board Regular
Joined
Apr 6, 2016
Messages
56
=IFERROR(VLOOKUP(B18,Data!$A$1:$U$289,MATCH($C$16,Data!$A$1:$U$1,1)),"")

The above is the query - the issue is that it is returning the incorrect information. The information that is being returned is being pulled is from another sheet where there is a data validation list, but somehow it is not returning what has been chosen, but another item on the list.

When i drag this query down to other cells it only sees the same item on the list?

Anyone any ideas ??
 
will you be able to post your sheet here by taking out the sensitive info?
 
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Permissions 2.xlsm
BCDEFGHI
2
3Invoice
4
5Customer InformationInvoice Information
6
7NameDate21/09/2020e
8AddressInvoice Number2020-1
9Payment Required by Date20/11/2020
10
11
12Site(s)
13
14
15
16Event NumberEvent being requestedFacility FeeVat %VAT amountTotal
17E-3Filming - Film  
18 
19 
20 
Invoice
Cell Formulas
RangeFormula
G7G7=TODAY()
G8G8=IF('Invoice Tracker'!A2="",YEAR(TODAY())&"-1",YEAR(TODAY())&"-"&MID(OFFSET('Invoice Tracker'!A1,COUNTA('Invoice Tracker'!A:A)-1,0),6,9999)+1)
G9G9=G7+60
B16B16=Data!B1
F17F17=IF(E17="","",D17*E17%)
G17G17=IF(E17="","",D17+F17)
C16C16=Data!H1
C17C17=VLOOKUP(Invoice!B17,Data!A1:U1584,MATCH(Invoice!C16,Data!A1:U1,0))
C18:C20C18=IFERROR(VLOOKUP(B18,Data!$A$1:$U$289,MATCH($C$16,Data!$A$1:$U$1,1)),"")
Named Ranges
NameRefers ToCells
Data!_FilterDatabase=Data!$A$1:$U$1C17:C20
Cells with Data Validation
CellAllowCriteria
C12:C13List=Dropdown!#REF!
 
Upvote 0
Permissions 2.xlsm
ABCDEFGHIJKLM
1Staff Member AssignedEvent NumberDepotSiteIF NATIONAL MONUMENT IS NOT LISTED - OnlyDate Request ReceivedEvent Organisers DetailsEvent being requestedEvent Details - If dates are not known enter details hereStart Date of EventEnd Date of EventLetter of Permission Date IssuedIndemnities Received and Filed
2BredaE-1TrimJoe WicksFilming - EducationalFilming03/07/202003/07/2020
3BredaE-2TrimJohn DoeFilming - FilmChoir Performance17/07/202021/07/2020
4
5
6
Data
Cell Formulas
RangeFormula
B2B2=IF(A2="","",IF('Invoice Tracker'!D2="","E-1","E-"&MID(OFFSET('Invoice Tracker'!D1,COUNTA('Invoice Tracker'!D:D)-1,0),3,9999)+1))
B3B3=IF(A3="","","E-"&MID(B2,3,9999)+1)
Cells with Data Validation
CellAllowCriteria
M2:M6List=#REF!
C3:C6List=SIte
A2:A6List=Dropdown!$D$2:$D$4
H2:H3List=Dropdown!$B$2:$B$37
C2List=Dropdown!$A$2:$A$4
D2List=Dropdown!#REF!
 
Upvote 0
the problem of the vlookup is to look up column 1 for matches (i.e. Col A), and you try to match the second column B (E-1, E-2 etc)

change C17 to

=VLOOKUP(Invoice!B17,Data!$B$1:$U$1584,MATCH(Invoice!C$16,Data!$B$1:$U$1,0),0)

should work
 
Upvote 0
the index-match approach is more flexible as you can match any columns or rows, such as

=INDEX(Data!$A:$U,MATCH(Invoice!B17,Data!$B:$B),MATCH(Invoice!C$16,Data!$1:$1,0))
 
Upvote 0
Perfect AlanY thank you for all the help, by any chance could you help with the button to save the invoice to a tracker?
 
Upvote 0

Forum statistics

Threads
1,216,075
Messages
6,128,665
Members
449,462
Latest member
Chislobog

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