# Issue with MATCH

#### shakeregg

##### New Member
Hey all,

FormR kindly helped with combining two formulas together:

=IF(AND(INDEX(T:T,MATCH(E5,AF:\$AF,0))=G5,INDEX(BJ:BJ,MATCH(E5,AF:\$AF,0))=H5),"Yes","No")

This formula is replicated in Rows until 1500 i.e.

=IF(AND(INDEX(T:T,MATCH(E6,AF:\$AF,0))=G6,INDEX(BJ:BJ,MATCH(E6,AF:\$AF,0))=H6),"Yes","No")

etc etc

The issue that I'm now facing is that on occasions the data inputted in Column E and AF may be the same in multiple cells i.e. Smith, John. As a result it's often incorrectly returning a 'No' as it's picking up the first Smith, John in AF. What I want it do if possible is to continue searching for the exact match (T:T & G5, BJ:BJ & H5 etc) and return a 'No' then if it's not found.

Hopefully that makes sense

Cheers for any help people can provide!

Matt

### Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

#### oldbrewer

##### Board Regular
are you certain there are 0 or 1 perfect matches ?

#### oldbrewer

##### Board Regular
 row 4 bob smith 9 bob jones 14 row 5 tom jones 7 b jones 5 rob jones 12 bob jones 14 14 obtained by bill green 16 =OFFSET(\$A\$4,MATCH(E5,\$A\$5:\$A\$100,0),1)

<colgroup><col width="64" span="11" style="width:48pt"> </colgroup><tbody>
</tbody>

#### DanteAmor

##### Well-known Member
Use this:

Excel Workbook
AEFGHTAFBJ
1
5John SmithYesnewoldwithoutJohn Smithnew
6CarolNoSwitchwhitewithoutJohn Smithnew
7SueYesislabonitanewJohn Smithold
8SwitchCarolYellow
9SwitchCarolPink
10SwitchCarolblue
11islaSuecan
12islaSuebonita
13islaSuedessert
sheet1

Last edited:

##### MrExcel MVP
[…]

[…]
Try to provide a small sample along with the desired output.

1,102,050
Messages
5,484,417
Members
407,438
Latest member
DKrakken

### This Week's Hot Topics

• Finding issue in If elseif else with For each Loop
Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
• MsgBox Error
Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
• CELL FORMAT - IF CONDITION
My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
• Show numbers nearly the same
Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...