Index, Match and Does Not Equal To

nicolakc

New Member
Joined
Sep 18, 2014
Messages
3
Hi all,

Just wondering if anyone knows how to return a value in index and match, that is not equal to a value in another cell or range of cells. My current formula is:

=INDEX($C$6:$C$9,MATCH($B$27,$D$6:$D$9,0),)

I need to somehow embed a <> function in here.

I have researched lookup, match and index and can't find the answer anywhere - help!

Thanks...
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
depends
=INDEX($C$6:$C$9,MATCH(TRUE,INDEX($D$6:$D$9<>B27,0),0))
would find the first match that doesn't = b27
 
Upvote 0
i think you need to give a better example of your data

Hi Martin,

Here is an example:

ABC
1BellaVIC
2SandgateNSW
3KaringalQLD
4AlluraVIC
5
6VIC
7
8=INDEX(A1:A4,MATCH(A6,b1:b4,0),)
9=INDEX(A1:A4,MATCH(A6,b1:b4,0),)

<tbody>
</tbody>

So I want the result in A8 to equal Bella, but I want the result in A9 to equal Allura, because Bella has already been used.

Thanks again!
 
Upvote 0
do you mean this
Sheet2

*ABCDEFGHIJ
2BellaVIC*VICBella*note a2:a10 is 9 rows ***
3SandgateNSW**Allura*hence***
4KaringalQLD****ROW($1:$9) is used in the formula***
5AlluraVIC********

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
E2{=IFERROR(INDEX($A$2:$A$10,SMALL(IF($B$2:$B$10=$D$2,ROW($1:$9),""),ROWS($1:1))),"")}
E3{=IFERROR(INDEX($A$2:$A$10,SMALL(IF($B$2:$B$10=$D$2,ROW($1:$9),""),ROWS($1: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

if you are pre excel 2007 use this version
=IF(ROWS($1:1)>COUNTIF($B$2:$B$10,$D$2),"",INDEX($A$2:$A$10,SMALL(IF($B$2:$B$10=$D$2,ROW($1:$9),""),ROWS($1:1)))) again array entered
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,945
Messages
6,122,397
Members
449,081
Latest member
JAMES KECULAH

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