If, countif, index

joetogo

New Member
Joined
Apr 16, 2017
Messages
12
Hi team,

I feel like I'm not that far off from what i want to achieve, but what I'm essentially trying to do is
have multiple criteria reference a table where there are 2 criteria are dynamic ref cells.

With Sheet2, i managed to get it to work somewhat, but it the result doesn't show the first Service
for the customer in the table. As in it lists all the correct services except for the first. I'm not sure how
to get the second criteria "Category" to work either.

Sheet1's formula does what I want it to, but instead of displaying all the relevant records, it dupes the
same record.

https://www.dropbox.com/s/6sw2aaxdk0hu1v0/TestSheet.xlsx?dl=0

Can anybody please help?
 
Re: If, countif, index help!! :(

my excel version is 1710 (Build 8625.2127) - part of my O365PP package
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Re: If, countif, index help!! :(

You sir are the man. This is now working perfectly. Thank you so much for your assistance!!!
 
Upvote 0
Re: If, countif, index help!! :(

I see the problem. I left out an IF statement in the second part of the formula.

Should be:
Code:
[TABLE="width: 1531"]
<tbody>[TR]
[TD="width: 1531"]=IF(ISERROR(INDEX($A$2:$C$16,SMALL(IF($A$2:$A$16=$E$3,IF($C$2:$C$16=$E$5,ROW($A$2:$A$16)-ROW($A$2)+1)),ROWS($G$3:G3)),2)),"",INDEX($A$2:$C$16,SMALL(IF($A$2:$A$16=$E$3,[COLOR=#ff0000]IF($C$2:$C$16=$E$5[/COLOR],ROW($A$2:$A$16)-ROW($A$2)+1)),ROWS($G$3:G3)),2))[/TD]
[/TR]
</tbody>[/TABLE]

ABCDEFG
1CompanyService NameCategory Criteria Output
2Parliamentary ServiceWAN Service Lite@SILVERNetwork Company Services
3Parliamentary ServiceVoice Connect@SILVERVoice Parliamentary Service WAN Service Lite@SILVER
4Parliamentary ServiceWAN Service Premium@GOLDNetwork Category WAN Service Premium@GOLD
5Parliamentary ServiceWAN Service Delivery Platform@SILVERNetwork Network WAN Service Delivery Platform@SILVER
6Parliamentary ServiceWAN Service Premium@SILVERMobile WAN Service Delivery Platform@SILVER
7Parliamentary ServiceWAN Service Delivery Platform@SILVERNetwork
8Parliamentary ServiceVoice Connect@SILVERVoice
9Ministry of JusticeTaaS GNet Site Connectivity@MOJNZXANetwork
10Ministry of JusticeCorporate Mobile Direct@GOLDMobile
11Ministry of JusticeeFax@SILVERVoice
12Ministry of JusticeFrame Relay@GOLDIT
13Ministry of JusticeGen-i Direct Connect@GOLDMobile
14Ministry of JusticeInternet Service Plus@GOLDVoice
15Ministry of JusticeWAN Service Premium@GOLDNetwork
16Ministry of JusticeWAN Service Foundation@GOLDYNetwork
17
18
19
20
21
22
23Ministry of JusticeVoice
24Parliamentary ServiceNetwork

<colgroup><col style="width:30px; "><col style="width:130px;"><col style="width:227px;"><col style="width:78px;"><col style="width:64px;"><col style="width:143px;"><col style="width:64px;"><col style="width:256px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
G3{=IF(ISERROR(INDEX($A$2:$C$16,SMALL(IF($A$2:$A$16=$E$3,IF($C$2:$C$16=$E$5,ROW($A$2:$A$16)-ROW($A$2)+1)),ROWS($G$3:G3)),2)),"",INDEX($A$2:$C$16,SMALL(IF($A$2:$A$16=$E$3,IF($C$2:$C$16=$E$5,ROW($A$2:$A$16)-ROW($A$2)+1)),ROWS($G$3:G3)),2))}

<tbody>
</tbody>
Formula Array:
Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4


Thank you so much AhoyNC - working perfectly!!! :)
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,520
Members
449,088
Latest member
RandomExceller01

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