HOW TO SOLVE RETURNING THE FIRST VALUE ONLY (INDEX MATCH)

AYSHANA

Board Regular
Joined
Oct 16, 2021
Messages
90
Office Version
  1. 2019
  2. 2013
Platform
  1. Windows
Good Day!

i would like to ask for a help. why my Index Match formula is returning the first value only.
if anyone can tell me what mistake im doing.

thank you.


Book1
ABC
1ACCCUNIT NUMBER Allocated in BGRPS orderBLOOD BGRP
2M3219250
3W4888070
4X3389240
5T7714390
6F3915680
7T7919350
8W476272U240123006498
9W476272U240123006498it should be U240123006507
10T787716U240123002474
Sheet2
Cell Formulas
RangeFormula
B2:B10B2=INDEX(Sheet1!$D$2:$G$10,MATCH(Sheet2!$A2,Sheet1!$A$2:$A$10,0),1)


Book1
ABCD
1Acc No#PT NumberPT NameUNIT NUMBER Allocated in BGRPS order
2M321925
3W488807
4X338924
5T771439
6F391568
7T791935
8W476272U240123006498
9W476272U240123006507
10T787716U240123002474
Sheet1
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
You'll need this:
Excel Formula:
=INDEX(Sheet1!$D$2:$D$10,SMALL(IF((Sheet2!$A2=Sheet1!$A$2:$A$10)*1,ROW($A$1:$A$9)),ROWS($A$1:A1)))

This is an array formula. You must press Ctrl+Shift+Enter together after paste.
 
Upvote 1
A normally entered formula
Excel Formula:
=INDEX(Sheet1!$D:$D,AGGREGATE(15,6,ROW(Sheet1!$D$2:$D$10)/($A2=Sheet1!$A$2:$A$10),COUNTIFS(A$2:A2,A2)))
 
Upvote 1
Solution
This should work better:
Excel Formula:
=INDEX(Sheet1!$D$2:$D$10,SMALL(IF((A2=Sheet1!$A$2:$A$10)*1,ROW($A$1:$A$9)),COUNTIF($A$1:A2,A2)))
This is an array formula also. You must press Ctrl+Shift+Enter together after paste.
 
Upvote 0
A normally entered formula
Excel Formula:
=INDEX(Sheet1!$D:$D,AGGREGATE(15,6,ROW(Sheet1!$D$2:$D$10)/($A2=Sheet1!$A$2:$A$10),COUNTIFS(A$2:A2,A2)))
Hi Fluff,

Is there a particular reason that you've used COUNTIFS instead of COUNTIF?
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,369
Members
449,080
Latest member
Armadillos

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