Index and Match Duplicates

matthewlouis

Active Member
Joined
Mar 28, 2014
Messages
374
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I am using Index and Match with the variable being a percentage. However, I have duplicate percentages that have different matches (rows). So it is only returning the first row's information.

How do I get the Index and Match formula to recognize the different data on different rows given the duplicate percentages.

=IF(D26<>"",INDEX('INDEX Bullish RR'!$A$1:$DL$1,MATCH(D26,'INDEX Bullish RR'!$A$2:$DL$2,0)),"") where D26 = 6.35% and returns one row of data -- then the next row is . . .

=IF(D26<>"",INDEX('INDEX Bullish RR'!$A$1:$DL$1,MATCH(D27,'INDEX Bullish RR'!$A$2:$DL$2,0)),"") where D27 ALSO = 6.35% but it still returns the data from the row above it and ignores this row's data.

Thanks in advance for your imput and ideas :)
 
Last edited:

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Oops, sorry. These are the formulas.

=IF(D26<>"",INDEX('INDEX Bullish RR'!$A$1:$DL$1,MATCH(D26,'INDEX Bullish RR'!$A$2:$DL$2,0)),"") where D26 = 6.35% and returns one row of data -- then the next row is . . .

=IF(D26<>"",INDEX('INDEX Bullish RR'!$A$68:$DL$68,MATCH(D27,'INDEX Bullish RR'!$A$69:$DL$69,0)),"") where D27 ALSO = 6.35% but it still returns the data from the row above it and ignores this row's data.

It's looking at two different different tables but the "match" is the same number so it is only returning the first set od data and not the second.

Thanks, Aladin, what do you think?
 
Upvote 0
Suppose we have in A1:C1

jon, matthew, jaap

In A2:C2

50,45,60

Looking for 45 in A2:C2, we will get: matthew


Suppose we have in A10:C10

15,45,100

Looking for 45 in A10:C10, we will get: matthew

These results are totally justified. Looks like you have a similar situation.
 
Upvote 0
OK, thanks, Aladin . . . looks I will need to do it a different way because there is data I need from both lines, i.e., the 45 in your example = the 6.35% in my example. However, there are 4 other cells on that row that I want to return the date to me for and I am using the 6.35% (or 45 in your example). Perhaps I needs to use another "looking for" part. Thanks for your help!
 
Upvote 0
Daily SP Low2/9/20182,532.692,638.672,639.40Hasn't Closed Under SPL -4.04%
Intermediate SP Low2/5/20182,532.692,763.392,639.40Hasn't Closed Under SPL


-4.04%

<colgroup><col style="mso-width-source:userset;mso-width-alt:25888;width:607pt" width="809"> <col style="mso-width-source:userset;mso-width-alt:7712;width:181pt" width="241"> <col style="mso-width-source:userset;mso-width-alt:6976;width:164pt" width="218"> <col style="mso-width-source:userset;mso-width-alt:7488;width:176pt" width="234"> <col style="mso-width-source:userset;mso-width-alt:7840;width:184pt" width="245"> <col style="mso-width-source:userset;mso-width-alt:43520; width:1020pt" width="1360"> <col style="mso-width-source:userset;mso-width-alt:6272;width:147pt" width="196"> <col style="mso-width-source:userset;mso-width-alt:9216;width:216pt" width="288"> </colgroup><tbody>
</tbody>



Aladin, 2,532 is the low and the current price of 2,639 is -4.04% away from the 2,532. However, one is Daily SP Low and the other is an Intermediate SP Low. In another summary table, I am Index and Matching the -4.04% to try and retrieve both rows information. The problem is it's only returning the first row's information and NOT the second row.

Hope that helps! What do you think?
 
Upvote 0
Daily SP Low2/9/20182,532.692,638.672,639.40Hasn't Closed Under SPL -4.04%
Intermediate SP Low2/5/20182,532.692,763.392,639.40Hasn't Closed Under SPL


-4.04%

<colgroup><col style="mso-width-source:userset;mso-width-alt:25888;width:607pt" width="809"> <col style="mso-width-source:userset;mso-width-alt:7712;width:181pt" width="241"> <col style="mso-width-source:userset;mso-width-alt:6976;width:164pt" width="218"> <col style="mso-width-source:userset;mso-width-alt:7488;width:176pt" width="234"> <col style="mso-width-source:userset;mso-width-alt:7840;width:184pt" width="245"> <col style="mso-width-source:userset;mso-width-alt:43520; width:1020pt" width="1360"> <col style="mso-width-source:userset;mso-width-alt:6272;width:147pt" width="196"> <col style="mso-width-source:userset;mso-width-alt:9216;width:216pt" width="288"> </colgroup><tbody>
</tbody>



Aladin, 2,532 is the low and the current price of 2,639 is -4.04% away from the 2,532. However, one is Daily SP Low and the other is an Intermediate SP Low. In another summary table, I am Index and Matching the -4.04% to try and retrieve both rows information. The problem is it's only returning the first row's information and NOT the second row.

Hope that helps! What do you think?

It's up to you to re-map what follows to your actual workbook.

Let A2:H3 of Sheet1 house the above data.

Let A1 of Sheet2 house -4.04%, the percentage of interest.

In A2 of Sheet2 enter:

=COUNTIFS(Sheet1!$H$2:$H$3,$A$1)

In A4 control+shift+enter, not just enter:

=IF(ROWS($A$4:A4)>$A$2,"",SMALL(IF(Sheet1!$H$2:$H$3=$A$1,ROW(Sheet1!$H$2:$H$3)-ROW(Sheet1!$H$2)+1),ROWS($A$4:A4)))

In B4 just enter, copy across, and down:

=IF($A4="","",INDEX(Sheet1!A$2:A$3,$A4))
 
Upvote 0
Hmmmm, if A1:A16 of Sheet2 contains all the percentages (A1= -4.04%) and I copy the COUNTIF formula in A2 of Sheet2, it gives me a number (1) for how many times that number occurs. However, that A column in Sheet2 has all the percentages in it . . . my souce data. Then in A4 of Sheet2, you say to do the control+shift+enter formula. Am I missing something, because what you're saying to do is wiping out my source data in Sheet2 (where the -4.04% is housed and all other percentages following it).

Is there a column off or something? I have mapped it every which or way and it doesn't work.

Thanks for you help on this, Aladin.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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