Index Match along with SMALL and COUNTIF

asad

Well-known Member
Joined
Sep 9, 2008
Messages
1,434
Hello Guys,
I got a three formulae that return results from another worksheet. One of these is working alright - the one that returns the dates. But the two other are not working. I am posting a portion here. Any help is appreciated and THANKS in advance.
Excel Workbook
ABCD
1LAST NAMEFIRST NAMEDC Exp date31/12/2012
2#NUM!#NUM!26/03/2008
3#NUM!#NUM!10/07/2008
4#NUM!#NUM!10/07/2008
5#NUM!#NUM!10/07/2008
DC
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
OK
I will post another sample where another formula is working but it is giving me the same result for same date in three different cells. I would like to get three right results which will be different person name in all three cases.
Excel Workbook
ABCDEF
1LAST NAMEFIRST NAMEDC Exp date31/12/2012
2#NUM!#NUM!26/03/2008BOGDANOVIC
3#NUM!#NUM!10/07/2008SIPILIANO
4#NUM!#NUM!10/07/2008SIPILIANO
5#NUM!#NUM!10/07/2008SIPILIANO
DC
 
Upvote 0
I worked it out myself, so no need of any solutions now. Thanks anyway to anyone who may have tried to solve it for me.
 
Upvote 0
I worked it out myself, so no need of any solutions now. Thanks anyway to anyone who may have tried to solve it for me.
OK, glad you got it worked out. Here's a tip that'll save you a few keystrokes when dealing with complex formulas like those:

=IF(ISERROR(INDEX(Details!$C$2:$R$40,MATCH($C4,Details!R$2:R$40,0),3)),"",SMALL(INDEX(Details!$C$2:$R$40,MATCH($C4,Details!R$2:R$40,0),3),COUNTIF(C$2:C4,C4)))

When error trapping, the portion of the formula that will actually cause an error is the MATCH function so you can leave out the INDEX portion:

=IF(ISERROR(MATCH($C4,Details!R$2:R$40,0)),"",SMALL(INDEX(Details!$C$2:$R$40,MATCH($C4,Details!R$2:R$40,0),3),COUNTIF(C$2:C4,C4)))

Or, since the MATCH function generates an #N/A error:

=IF(ISNA(MATCH($C4,Details!R$2:R$40,0)),"",SMALL(INDEX(Details!$C$2:$R$40,MATCH($C4,Details!R$2:R$40,0),3),COUNTIF(C$2:C4,C4)))

Or,

=IF(COUNTIF(Details!R$2:R$40,$C4),SMALL(INDEX(Details!$C$2:$R$40,MATCH($C4,Details!R$2:R$40,0),3),COUNTIF(C$2:C4,C4)),"")
 
Upvote 0
Thanks #NAME for your tips. I will try to memorise them for my other formulae as well. Thanks again :)
 
Upvote 0

Forum statistics

Threads
1,215,771
Messages
6,126,799
Members
449,337
Latest member
BBV123

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