Index Match function to find outliers

Hiten_pan

New Member
Joined
Mar 13, 2018
Messages
24
Hi friends,


I am working on a project where I would need below raw data to show expected results as shown below.
Basically, it is an outlier report where only "Check Accts" will be flagged. Thanks!!!
I am looking for the formulae without {} brackets, it maybe combination of Index Match function

Raw data
[TABLE="class: cms_table, width: 530"]
<tbody>[TR]
[TD]Unique #[/TD]
[TD]Acct[/TD]
[TD]Cusip[/TD]
[TD]Direction[/TD]
[TD]Broker Accruals[/TD]
[TD]PIMCO Accruals[/TD]
[/TR]
[TR]
[TD]695CCHUSIUS4[/TD]
[TD]695[/TD]
[TD]CCHUSIUS4[/TD]
[TD]IP[/TD]
[TD]1738.51[/TD]
[TD="align: right"]1733.52[/TD]
[/TR]
[TR]
[TD]1023CCHUSIUS4[/TD]
[TD]1023[/TD]
[TD]CCHUSIUS4[/TD]
[TD]IP[/TD]
[TD]1109.51[/TD]
[TD="align: right"]1076.08[/TD]
[/TR]
[TR]
[TD]3199CCHUSIUS4[/TD]
[TD]3199[/TD]
[TD]CCHUSIUS4[/TD]
[TD]IP[/TD]
[TD]1099.89[/TD]
[TD]CHECK Acct#[/TD]
[/TR]
[TR]
[TD]1203CCHUSIUS4[/TD]
[TD]1203[/TD]
[TD]CCHUSIUS4[/TD]
[TD]IP[/TD]
[TD]772.23[/TD]
[TD="align: right"]773.85[/TD]
[/TR]
[TR]
[TD]2755CCHUSIUS4[/TD]
[TD]2755[/TD]
[TD]CCHUSIUS4[/TD]
[TD]IP[/TD]
[TD]417.71[/TD]
[TD="align: right"]417.66[/TD]
[/TR]
[TR]
[TD]96CCHUSIUS4[/TD]
[TD]96[/TD]
[TD]CCHUSIUS4[/TD]
[TD]IP[/TD]
[TD]194.31[/TD]
[TD="align: right"]194.57[/TD]
[/TR]
[TR]
[TD]2462CCHUSIUS4[/TD]
[TD]2462[/TD]
[TD]CCHUSIUS4[/TD]
[TD]IP[/TD]
[TD]181.3[/TD]
[TD="align: right"]181.55[/TD]
[/TR]
[TR]
[TD]3684CCHUSIUS4[/TD]
[TD]3684[/TD]
[TD]CCHUSIUS4[/TD]
[TD]IP[/TD]
[TD]119.94[/TD]
[TD="align: right"]120[/TD]
[/TR]
[TR]
[TD]7893CCHUSIUS4[/TD]
[TD]7893[/TD]
[TD]CCHUSIUS4[/TD]
[TD]IP[/TD]
[TD]85.5[/TD]
[TD]CHECK Acct#[/TD]
[/TR]
[TR]
[TD]935CCHUSIUS4[/TD]
[TD]935[/TD]
[TD]CCHUSIUS4[/TD]
[TD]IP[/TD]
[TD]80.13[/TD]
[TD="align: right"]80.13[/TD]
[/TR]
</tbody>[/TABLE]


Expected results
[TABLE="class: cms_table, width: 209"]
<tbody>[TR]
[TD]PIMCO Accruals[/TD]
[TD]Unique #[/TD]
[/TR]
[TR]
[TD]CHECK Acct#[/TD]
[TD]3199CCHUSIUS4[/TD]
[/TR]
[TR]
[TD]CHECK Acct#[/TD]
[TD]7893CCHUSIUS4[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Why not just autofilter column F?
 
Upvote 0
The only single formula I know to do this requires ctrl-shift-enter, otherwise you need a helper column.
 
Upvote 0
This CSE formula is well known:


Excel 2010
ABCDEFGHIJ
1Unique #AcctCusipDirectionBroker AccrualsPIMCO AccrualsPIMCO AccrualsUnique #
2695CCHUSIUS4695CCHUSIUS4IP1738.511733.52CHECK Acct#3199CCHUSIUS4
31023CCHUSIUS41023CCHUSIUS4IP1109.511076.08CHECK Acct#7893CCHUSIUS4
43199CCHUSIUS43199CCHUSIUS4IP1099.89CHECK Acct#
51203CCHUSIUS41203CCHUSIUS4IP772.23773.85
62755CCHUSIUS42755CCHUSIUS4IP417.71417.66
796CCHUSIUS496CCHUSIUS4IP194.31194.57
82462CCHUSIUS42462CCHUSIUS4IP181.3181.55
93684CCHUSIUS43684CCHUSIUS4IP119.94120
107893CCHUSIUS47893CCHUSIUS4IP85.5CHECK Acct#
11935CCHUSIUS4935CCHUSIUS4IP80.1380.13
Sheet1
Cell Formulas
RangeFormula
J2{=INDEX($A$1:$A$11,SMALL(IF($F$2:$F$11="CHECK Acct#",ROW($F$2:$F$11)),ROW(A1)))}
Press CTRL+SHIFT+ENTER to enter array formulas.


But you can have this instead:


Excel 2010
ABCDEFGHIJ
1Unique #AcctCusipDirectionBroker AccrualsPIMCO AccrualsPIMCO AccrualsUnique #
2695CCHUSIUS4695CCHUSIUS4IP1738.511733.520CHECK Acct#3199CCHUSIUS4
31023CCHUSIUS41023CCHUSIUS4IP1109.511076.080CHECK Acct#7893CCHUSIUS4
43199CCHUSIUS43199CCHUSIUS4IP1099.89CHECK Acct#1
51203CCHUSIUS41203CCHUSIUS4IP772.23773.850
62755CCHUSIUS42755CCHUSIUS4IP417.71417.660
796CCHUSIUS496CCHUSIUS4IP194.31194.570
82462CCHUSIUS42462CCHUSIUS4IP181.3181.550
93684CCHUSIUS43684CCHUSIUS4IP119.941200
107893CCHUSIUS47893CCHUSIUS4IP85.5CHECK Acct#2
11935CCHUSIUS4935CCHUSIUS4IP80.1380.130
Sheet1
Cell Formulas
RangeFormula
G2=IF(F2="CHECK Acct#",COUNTIF($F$2:F2,"CHECK Acct#"),0)
J2=INDEX($A$2:$A$11,MATCH(ROW(A1),$G$2:$G$11,0))
 
Last edited:
Upvote 0
I really like the examples given by SheetSpread and Markmzz above. I'm learning and wanted to go through the exercise. Another example not requiring CSE thanks to Mike Girvin's videos:

Also using Sheetspreads layout in J2 and copy down:

Code:
[COLOR=#000000][FONT=&quot]=IFERROR(INDEX[COLOR=#006107]([/COLOR][COLOR=#0057d6]$A$2:$A$11[/COLOR],AGGREGATE[COLOR=#ab30d6]([/COLOR]15,6,[COLOR=#a54a29]([/COLOR]ROW[COLOR=#33af4a]([/COLOR][COLOR=#0057d6]$A$2:$A$11[/COLOR][COLOR=#33af4a])[/COLOR]-ROW[COLOR=#33af4a]([/COLOR][COLOR=#006107]$A$2[/COLOR][COLOR=#33af4a])[/COLOR]+1[COLOR=#a54a29])[/COLOR]/[COLOR=#a54a29]([/COLOR][COLOR=#ab30d6]$F$2:$F$11[/COLOR]="CHECK Acct#"[COLOR=#a54a29])[/COLOR],ROWS[COLOR=#a54a29](J$2:J2)[/COLOR][COLOR=#ab30d6])[/COLOR][COLOR=#006107])[/COLOR],"")[/FONT][/COLOR]
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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