Using INDEX/MATCH with duplicate values

JannetteChristie

Board Regular
Joined
Dec 14, 2015
Messages
127
Office Version
  1. 365
I receive the following data:


Book1
ABCDEFGH
1CodeConfigFlow rateFlor rate/pumpHeadHead unitQtySelling price
2code 1D/A21.521.57bar124681.00000
3code 20125061.54000
4code 3D/A10106.5bar115857.00000
5code 20113583.10000
6code 401685.00000
Sheet1


However when I try to list the codes out on a seperate sheet with the prices I get the same price for code 2 not the different prices (25061.54 and 13583.10) - how do I overcome this please ?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi,

1 What is your formula and why are you using INDEX+MATCH over VLOOKUP?
2 One suggestion is insert a column after A and enter formula = "=A2&"."&COUNTIF($A$2:A2)" and drag to the end. Then you can use VLOOKUP against this new column for a unique value per row to return specific price. VLOOKUP formula would be similar to:
Code:
=VLOOKUP(A2&"."&COUNTIF($A$2:A2),Range(B2:H6),7,0)
 
Last edited:
Upvote 0
Hi,

I am using the following formula: =IFERROR(INDEX('Input Sheet'!$D$11:$AJ110,MATCH($AR2,Input_Sheet__QuotationItemDTO.Code,0),10),"")

When I use your formaula as so: =VLOOKUP(Ar2&"."&COUNTIF($Ar$2:Ar2),Range(at2:bb11),9,0) - get the error message too few arguments
 
Upvote 0
The seperate sheet should look like the following:


Book1
ABCDEFGH
1Stock/Service CodeConfigurationFlow rateFlow Rate/Pump (l/s)HeadDuty Head UnitQuantitySelling Unit Price
2code 1D/A21.5124681
3extra code 11
4extra code 22
5code 200125061.54
6code 3D/A10115857
7extra code 11
8extra code 21
9code 200113583.1
10code 4001685
Sheet2
 
Last edited:
Upvote 0
In H2 of Sheet2 control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX(Sheet1!$H$2:$H$6,SMALL(IF(Sheet1!$A$2:$A$6=$A2,ROW(Sheet1!$A$2:$H$6)-ROW(INDEX(Sheet1!$A$2:$H$6,1,1))+1),COUNTIFS($A$2:A2,A2))),"")
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,262
Members
452,627
Latest member
KitkatToby

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