MATCH function not MATCHING

craigus51286

New Member
Joined
May 3, 2024
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hi All,

First time post but I am completely at a loss where I have decided to ask the internet for help.

I have two sheets I am working with and want to populate a cell depending on some conditions. E.g. If cell A1 of sheet 1 matches cell B2 of sheet two then cell B1 of sheet 1 will populate itself by copying cell D1 of sheet 2.

I have a much larger formula I am working with but came across an issue that I have whittled down to what I believe is the MATCH function not behaving. My formula works perfectly when trying to match the following as an example, 'ABC-1234-71-0' or 'ABC-1234-71-0 6' however, fails on 'ABC-1234-71-06' which is what I want the formula to match on.

I've spent hours checking everything I could possibly think of. They are an absolute exact match but its just not being seen.

Maybe I am being stupid or I have missed something glaring. With any luck, someone has had this happen to them and can help......
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
If the MATCH function is returning #N/A the the two cells are not an exact match.

Can you post some sample data that shows the problem.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
If the MATCH function is returning #N/A the the two cells are not an exact match.

Can you post some sample data that shows the problem.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
Thanks for the quick response.

I am not getting the #N/A error; the formula behaves perfectly fine but just doesn't recognise and give the right result when using 'ABC-1234-71-06' vs 'ABC-1234-71-0' or 'ABC-1234-71-0 6' which is giving the result I am wanting.

I will look into the add in....
 
Upvote 0
If you are not getting the #N/A error, then what are you getting?
Also what is your formula?
 
Upvote 0
If you are not getting the #N/A error, then what are you getting?
Also what is your formula?
I am getting a result as if the two cells weren't matching.

=IF(ISBLANK(INDEX(Transmittals!AS:AS, MATCH(A5, Transmittals!C:C, 0))), "", IF(ISERROR(IF(AND(ISNUMBER(MATCH(A5, Transmittals!C:C, 0)), INDEX(Transmittals!T:T, MATCH(A5, Transmittals!C:C, 0))="V"), INDEX(Transmittals!AS:AS, MATCH(A5, Transmittals!C:C, 0)), "")), "", IF(AND(ISNUMBER(MATCH(A5, Transmittals!C:C, 0)), INDEX(Transmittals!T:T, MATCH(A5, Transmittals!C:C, 0))="V"), INDEX(Transmittals!AS:AS, MATCH(A5, Transmittals!C:C, 0)), "")))

Using the above, Cell A5 from Sheet 1 needs to match with Column C of sheet 2 (Transmittals) with the condition of 'V' also present. If all true then a value is taken from AS into the cell this formula is.

When I enter into A5 and column C 'ABC-1234-71-06' I get a blank result however 'ABC-1234-71-0' or 'ABC-1234-71-0 6' gives me the result I am actually looking for from 'ABC-1234-71-06'.
 
Upvote 0
Hopefully I've done this right but sheet 1:

Project Engineering Transmittal Tracker Plan WIP.xlsx
ABCD
4Document NumberDocument TitleReceived?Latest Transmittal No.
5GFC-0306-71-06Private LVAC Dist.Boards ArrangementNo 
6GFC-0306-70-01Private Single Line DiagramNo 
Master Doc List
Cell Formulas
RangeFormula
D5:D6D5=IF(ISBLANK(INDEX(Transmittals!AS:AS, MATCH(A5, Transmittals!C:C, 0))), "", IF(ISERROR(IF(AND(ISNUMBER(MATCH(A5, Transmittals!C:C, 0)), INDEX(Transmittals!T:T, MATCH(A5, Transmittals!C:C, 0))="V"), INDEX(Transmittals!AS:AS, MATCH(A5, Transmittals!C:C, 0)), "")), "", IF(AND(ISNUMBER(MATCH(A5, Transmittals!C:C, 0)), INDEX(Transmittals!T:T, MATCH(A5, Transmittals!C:C, 0))="V"), INDEX(Transmittals!AS:AS, MATCH(A5, Transmittals!C:C, 0)), "")))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C5:C1048576Cell Valuecontains "No"textNO
C5:C1048576Cell Valuecontains "Yes"textNO
C5:C96Cell Valuecontains "Y"textNO
C5:C96Cell Valuecontains "N"textNO
A5:A96Cell Value="please do not use this line - insert one above"textNO
A5:A96Expression=#REF!="CLOSED"textNO


Sheet 2 (Transmittals):

Project Engineering Transmittal Tracker Plan WIP.xlsx
CDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAV
11GFC-0306-71-06DDRAWINGVPrivate LVAC Dist.Boards Arrangement08/02/244
15GFC-0306-70-01FDRAWINGVPrivate Single Line Diagram01/05/244
Transmittals
 
Upvote 0
Thanks for that, unfortunately your formula works for me & both return 4.
What does this formula return
Excel Formula:
=A5=Transmittals!C11
 
Upvote 0
Thanks for that, unfortunately your formula works for me & both return 4.
What does this formula return
Excel Formula:
=A5=Transmittals!C11
Project Engineering Transmittal Tracker Plan WIP.xlsx
ABCDEFG
5GFC-0306-71-06Private LVAC Dist.Boards ArrangementNo   
6GFC-0306-70-01Private Single Line DiagramNo   TRUE
Master Doc List
Cell Formulas
RangeFormula
D5:D6D5=IF(ISBLANK(INDEX(Transmittals!AS:AS, MATCH(A5, Transmittals!C:C, 0))), "", IF(ISERROR(IF(AND(ISNUMBER(MATCH(A5, Transmittals!C:C, 0)), INDEX(Transmittals!T:T, MATCH(A5, Transmittals!C:C, 0))="V"), INDEX(Transmittals!AS:AS, MATCH(A5, Transmittals!C:C, 0)), "")), "", IF(AND(ISNUMBER(MATCH(A5, Transmittals!C:C, 0)), INDEX(Transmittals!T:T, MATCH(A5, Transmittals!C:C, 0))="V"), INDEX(Transmittals!AS:AS, MATCH(A5, Transmittals!C:C, 0)), "")))
E5:E6E5=IF(ISBLANK(INDEX(Transmittals!AP:AP, MATCH(A5, Transmittals!C:C, 0))), "", IF(ISERROR(IF(AND(ISNUMBER(MATCH(A5, Transmittals!C:C, 0)), INDEX(Transmittals!T:T, MATCH(A5, Transmittals!C:C, 0))="V"), INDEX(Transmittals!AP:AP, MATCH(A5, Transmittals!C:C, 0)), "")), "", IF(AND(ISNUMBER(MATCH(A5, Transmittals!C:C, 0)), INDEX(Transmittals!T:T, MATCH(A5, Transmittals!C:C, 0))="V"), INDEX(Transmittals!AP:AP, MATCH(A5, Transmittals!C:C, 0)), "")))
F5:F6F5=IF(ISBLANK(INDEX(Transmittals!BF:BF, MATCH(A5, Transmittals!C:C, 0))), "", IF(ISERROR(IF(AND(ISNUMBER(MATCH(A5, Transmittals!C:C, 0)), INDEX(Transmittals!T:T, MATCH(A5, Transmittals!C:C, 0))="V"), INDEX(Transmittals!BF:BF, MATCH(A5, Transmittals!C:C, 0)), "")), "", IF(AND(ISNUMBER(MATCH(A5, Transmittals!C:C, 0)), INDEX(Transmittals!T:T, MATCH(A5, Transmittals!C:C, 0))="V"), INDEX(Transmittals!BF:BF, MATCH(A5, Transmittals!C:C, 0)), "")))
G6G6=A5=Transmittals!C11
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C5:C1048576Cell Valuecontains "No"textNO
C5:C1048576Cell Valuecontains "Yes"textNO
C5:C96Cell Valuecontains "Y"textNO
C5:C96Cell Valuecontains "N"textNO
A5:A96Cell Value="please do not use this line - insert one above"textNO
A5:A96Expression=#REF!="CLOSED"textNO


I only get '4' in cell D5 when I change 'GFC-0306-71-06' in A5 and C11 to either 'GFC-0306-71-0 6' or 'GFC-0306-71-0'

I'm completely baffled.

Project Engineering Transmittal Tracker Plan WIP.xlsx
ABCDEFG
4Document NumberDocument TitleReceived?Latest Transmittal No.Latest Transmittal Received DateLatest Transmittal Returned Date
5GFC-0306-71-0 6Private LVAC Dist.Boards ArrangementNo408/02/2024 
6GFC-0306-70-01Private Single Line DiagramNo   TRUE
Master Doc List
Cell Formulas
RangeFormula
D5:D6D5=IF(ISBLANK(INDEX(Transmittals!AS:AS, MATCH(A5, Transmittals!C:C, 0))), "", IF(ISERROR(IF(AND(ISNUMBER(MATCH(A5, Transmittals!C:C, 0)), INDEX(Transmittals!T:T, MATCH(A5, Transmittals!C:C, 0))="V"), INDEX(Transmittals!AS:AS, MATCH(A5, Transmittals!C:C, 0)), "")), "", IF(AND(ISNUMBER(MATCH(A5, Transmittals!C:C, 0)), INDEX(Transmittals!T:T, MATCH(A5, Transmittals!C:C, 0))="V"), INDEX(Transmittals!AS:AS, MATCH(A5, Transmittals!C:C, 0)), "")))
E5:E6E5=IF(ISBLANK(INDEX(Transmittals!AP:AP, MATCH(A5, Transmittals!C:C, 0))), "", IF(ISERROR(IF(AND(ISNUMBER(MATCH(A5, Transmittals!C:C, 0)), INDEX(Transmittals!T:T, MATCH(A5, Transmittals!C:C, 0))="V"), INDEX(Transmittals!AP:AP, MATCH(A5, Transmittals!C:C, 0)), "")), "", IF(AND(ISNUMBER(MATCH(A5, Transmittals!C:C, 0)), INDEX(Transmittals!T:T, MATCH(A5, Transmittals!C:C, 0))="V"), INDEX(Transmittals!AP:AP, MATCH(A5, Transmittals!C:C, 0)), "")))
F5:F6F5=IF(ISBLANK(INDEX(Transmittals!BF:BF, MATCH(A5, Transmittals!C:C, 0))), "", IF(ISERROR(IF(AND(ISNUMBER(MATCH(A5, Transmittals!C:C, 0)), INDEX(Transmittals!T:T, MATCH(A5, Transmittals!C:C, 0))="V"), INDEX(Transmittals!BF:BF, MATCH(A5, Transmittals!C:C, 0)), "")), "", IF(AND(ISNUMBER(MATCH(A5, Transmittals!C:C, 0)), INDEX(Transmittals!T:T, MATCH(A5, Transmittals!C:C, 0))="V"), INDEX(Transmittals!BF:BF, MATCH(A5, Transmittals!C:C, 0)), "")))
G6G6=A5=Transmittals!C11
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C5:C1048576Cell Valuecontains "No"textNO
C5:C1048576Cell Valuecontains "Yes"textNO
C5:C96Cell Valuecontains "Y"textNO
C5:C96Cell Valuecontains "N"textNO
A5:A96Cell Value="please do not use this line - insert one above"textNO
A5:A96Expression=#REF!="CLOSED"textNO
 
Upvote 0
Ok, with the values that don't work what does this return
Excel Formula:
=MATCH(A5, Transmittals!C:C, 0)
 
Upvote 0
Ok, with the values that don't work what does this return
Excel Formula:
=MATCH(A5, Transmittals!C:C, 0)
1714758263071.png
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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