Compare two colums that are the same infor but written differently

burniksapwet

Board Regular
Joined
Oct 6, 2017
Messages
53
Office Version
  1. 2016
Guys I need help from the geniuses of this forum. I need to compare two cells for names with different values. I cant simply change the cell information as they are from ODB connections from two different databases and are listed as such. I want to highlight the rows if the names in column A and column B meets the criteria that I want. I know I have to create multiple "rules" but that is fine with me. So it is basically something like if column a = AGIUSJ and column B = Jake Agius highlight that A and B cell. As you could see on my sample that the row 3 is not highlighted because AGIUSJ did not equal to Jake Agius in column B. I don't want to do a partial name comparison as I will at some point compare different names with no similarities like MODIFICATION in column A and PACKAGE with column B. I would like to thank everyone in advance and hopefully someone can help me out. Thank you.

SUPERVISORASSIGNEE
AGIUSJJake Agius
ISACAAndrei Isac
AGIUSJAndrei Isac
MESSINGJJason Messing
AGIUSJJake Agius
 
My deepest apologies sir. Your quires have all been working properly after rechecking all of it again today. It must have been because I was still working on this late at night and I was getting a little bit tired that caused me to either make a mistake or I was not paying attention to much to what I was doing. Now lastly I just noticed something that staff was doing after examining the result set of the quires so I will need help updating the last two queries you have created for me. They would sometimes add like a word in front. Mind updating the last two queries please to include that 2015-25 and MOC 2015-25 is equal and so are the rest? Below is a sample of what they are doing. Once again I am very grateful for the help that you have provided us. Thank you so much.
2015-25MOC 2015-25
2015-33WORK ORDER 2015-33
2016-08CONTRACT 2016-08
 
Upvote 0

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Could we have a more comprehensive list of all the various data forms that might exist in either column and a clear indication of exactly what results are expected. I am becoming confused by all the incremental changes.
 
Upvote 0
Filtered columns M and Q (purple highlight) with your code. Works perfectly except that it doesn't capture if staff decides to put alpha characters prior to the number like MOC RFB etc etc. Would like the code to be able to catch that as long as the numeric value is present. So essentially it is the same as the code you created with the comma separator but adds on to any alpha characters that staff may decide to add. Thank yo so much. Sorry if I have been asking this partially as I did not really know what to do initially with the data that was provided to me. Thank you so much. I also sent you a pm (start a conversation) that have the link to the actual excel file.


DCN and Maximo.xlsx
BCDHLMNOPQRTUWACADAEAFAG
1WORKSUBTYPETEAMSUPERVISORSTATUSWONUMWO_CMP_NUMWO_DCNSPDCN_IDDCN_CMP_NUMDCN_WODCN_TYPEDCN_STATUSASSIGNEESUPERVISORASSIGNEEEWORKSUBTYPEDCN_TYPEE
5BUSINESS SUPPORTDOCSMCNEILLEYBCLOSE57254212020-0516042DCN-DATA16042RFB 8224 / CMP 2020-055725421EngravingCompletedBen McNeilleyMENORCARRon MenorcaSRCSD MODIFICATIONCMP - DMG Updates (Not Tracked)
6BUSINESS SUPPORTDOCSOCAMPOGCLOSE57135282020-0515983DCN-DATA15983RFB 8224 / CMP 2020-055713528EngravingCompletedGeronimo OcampoARCILLARRyan ArcillaBUSINESS SUPPORTCMP - DMG Updates
7BUSINESS SUPPORTDOCSMALLOSCLOSE57072692020-19515998DCN-DATA1599843785707269EngravingCompletedSierra MalloOCAMPOGGeronimo OcampoBUSINESS SUPPORTCMP - DMG Updates (Not Tracked)
8BUSINESS SUPPORTDOCSOCAMPOGCLOSE57028512021-5315984DCN-DATA15984CMP 2021-535702851EngravingCompletedGeronimo OcampoKIBLERJJeffrey KiblerBUSINESS SUPPORTEngraving
10BUSINESS SUPPORTDOCSMALLOSCLOSE56978312020-19515946DCN-DATA15946RFB #43785697831EngravingCompletedSierra MalloMCNEILLEYBBen McNeilleyINTERNAL SUPPORTCMP - DMG Updates (Not Tracked)
16STANDARDDOCSGONZALEZAACLOSE56240222020-15115739DCN-DATA157395624022AOP / SOP / Ops ManualCompletedGenie FloresJOSEKKatheryne JosePMCMP - CMMS Updates
17STANDARDDOCSGONZALEZAACLOSE56176542020-15215738DCN-DATA157385617654AOP / SOP / Ops ManualCompletedGenie FloresRATTUSShailza RattuBUSINESS SUPPORTPlotting / Lamination / Labels
18STANDARDDOCSMENORCARCLOSE56136082020-14115634DCN-DATA156345613608NTC / CMP / RIKCompletedRon MenorcaNAVESJJack Naves
21STANDARDDOCSSINGHHCLOSE56049252020-14815608DCN-DATA156085604925NTC / CMP / RIKCompletedHarjeet SinghAGIUSJJake Agius
22O&M LIBRARYDOCSGONZALEZAACLOSE55985862020-0515601DCN-DATA156015598586AOP / SOP / Ops ManualCompletedGenie Flores
24DOCSMCNEILLEYBCLOSE55830982020-2515534DCN-DATA155345583098NTC / CMP / RIKCompletedBenjamin McNeilley
25SRCSD MODIFICATIONDOCSMCNEILLEYBCLOSE55713112020-19515508DCN-DATA155085571311NTC / MOCCompletedBenjamin McNeilleyTRUETRUE
26DOCSGONZALEZAACLOSE55673072020-8915501DCN-DATA155015567307AOP / SOP / Ops ManualCompletedGenie Flores
27HC1DOCSLACYKCLOSE55672222020-5614394DCN-DATA143945546263NTC / MOCCompletedBenjamin McNeilley
28DOCSMESSINGJCLOSE55670472020-5615496DCN-DATA154965567047NTC / MOCCompletedJason Messing
29HC1CMMSMERRILLNCLOSE55667912020-05N/ADCN-DATA
31O&M LIBRARYDOCSGONZALEZAACLOSE55630232020-0515484DCN-DATA154845563023AOP / SOP / Ops ManualCompletedGenie Flores
32SRCSD MODIFICATIONDOCSSINGHHCLOSE55593782020-19515477DCN-DATA154775559378NTC / MOCCompletedHarjeet Singh
33O&M LIBRARYDOCSGONZALEZAACLOSE55591632020-16615469DCN-DATA154692020-385559163AOP / SOP / Ops ManualCompletedGenie Flores
35DOCSSINGHHCLOSE55498432020-5615445DCN-DATA154455549843NTC / MOCCompletedHarjeet Singh
36DOCSMCNEILLEYBCLOSE55462632020-5614394DCN-DATA143945546263NTC / MOCCompletedBenjamin McNeilley
37DOCSGONZALEZAACLOSE55462032020-0415431DCN-DATA15431MOC 2020-045546203AOP / SOP / Ops ManualCompletedGenie Flores
38DOCSGONZALEZAACLOSE55458322020-9815433DCN-DATA154335545832AOP / SOP / Ops ManualCompletedGenie Flores
39DOCSMCNEILLEYBCLOSE55455022020-9215420DCN-DATA154205545502NTC / AEO / Management DirectiveCompletedBenjamin McNeilley
40DOCSGONZALEZAACLOSE55454892020-0415422DCN-DATA15422MOC 2020-045545489AOP / SOP / Ops ManualCompletedGenie Flores
41DOCSMCNEILLEYBCLOSE55454682018-1515406DCN-DATA15406MOC 2018-155545468NTC / MOCCompletedBenjamin McNeilley
42DOCSMCNEILLEYBCLOSE55454612020-9215418DCN-DATA154185545461NTC / AEO / Management DirectiveCompletedBenjamin McNeilley
43DOCSSINGHHCLOSE55453612018-1815403DCN-DATA154035545361NTC / MOCCompletedHarjeet Singh
44DOCSMCNEILLEYBCLOSE55451572020-5615410DCN-DATA154105545157NTC / MOCCompletedBenjamin McNeilley
45DOCSMESSINGJCLOSE55410932020-0415413DCN-DATA15413MOC 2020-045541093NTC / MOCCompletedJason Messing
46DOCSISACACLOSE55409672020-5614402DCN-DATA144025540967NTC / MOCCompletedAndrei Isac
47DOCSMESSINGJCLOSE55406072019-1514397DCN-DATA14397MOC2019-155540607NTC / MOCCompletedJason Messing
48DOCSSINGHHCLOSE55403752020-5614391DCN-DATA143915540375NTC / MOCCompletedHarjeet Singh
49DOCSLACYKCLOSE55386482020-4314341DCN-DATA143415532056NTC / MOCCompletedAndrei Isac
50DOCSGONZALEZAACLOSE55386022019-1514388DCN-DATA14388MOC 2019-155538602AOP / SOP / Ops ManualCompletedGenie Flores
51DOCSGONZALEZAACLOSE55328452020-5614374DCN-DATA143745532845AOP / SOP / Ops ManualCompletedKatheryne Jose
52DOCSSINGHHCLOSE55238112020-5614348DCN-DATA143485523811NTC / MOCCompletedHarjeet Singh
53DOCSGONZALEZAACLOSE55237472020-5614346DCN-DATA143465523747AOP / SOP / Ops ManualCompletedGenie Flores
54DOCSMENORCARCLOSE55237422020-5614347DCN-DATA143475523742NTC / MOCCompletedRon Menorca
55DOCSSINGHHCLOSE55233722020-5614337DCN-DATA143375523372NTC / MOCCompletedHarjeet Singh
56DOCSMENORCARCLOSE55233672020-5614336DCN-DATA143365523367NTC / MOCCompletedRon Menorca
57DOCSMESSINGJCLOSE55233222020-5614335DCN-DATA143355523322NTC / MOCCompletedJason Messing
58DOCSGONZALEZAACLOSE55186122020-5614325DCN-DATA143255518612AOP / SOP / Ops ManualCompletedGenie Flores
59DOCSISACACLOSE55184762020-5614319DCN-DATA143195518476NTC / MOCCompletedAndrei Isac
61DOCSMCNEILLEYBCLOSE55184412020-5614318DCN-DATA143185518441NTC / MOCCompletedBenjamin McNeilley
WO-DCN
Cell Formulas
RangeFormula
AD25AD25=AND($D1<>"",$W1<>"",COUNTIFS($AD$1:$AD$24,$D1,$AE$1:$AE$24,$W1)=0)
AF25AF25=AND($B1<>"",$T1<>"",COUNTIFS($AF$1:$AF$24,$B1,$AG$1:$AG$24,$T1)=0)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
O:OCell Valuecontains "DCN-DATA"textNO
N:N,P:PExpression=ISERROR(FIND(","&$N1&",",","&SUBSTITUTE($P1," ","")&","" "))textNO
M:M,Q:QExpression=ISERROR(FIND(","&$M1&",",","&SUBSTITUTE($Q1," ","")&","" "))textNO
L:L,R:RExpression=ISERROR(FIND(","&$L1&",",","&SUBSTITUTE($R1," ","")&","" "))textNO
D:D,W:WExpression=AND($D1<>"",$W1<>"",COUNTIFS($AD$1:$AD$24,$D1,$AE$1:$AE$24,$W1)=0)textNO
B:B,T:TExpression=AND($B1<>"",$T1<>"",COUNTIFS($AF$1:$AF$24,$B1,$AG$1:$AG$24,$T1)=0)textNO
H:H,U:UExpression=AND($H1<>"",$U1<>"",COUNTIFS($AH$1:$AH$24,$H1,$AI$1:$AI$24,$U1)=0)textNO
 
Upvote 0
I also sent you a pm (start a conversation) that have the link to the actual excel file.
If you want to share a link to an actual file then you need to post it publicly in your thread (see #4 of the Forum Rules) though you should also note that many members are unwilling, or unable due to workplace security settings, to download such files.

Based on what you have shown above, see if this does what you want

burniksapwet.xlsm
MNOPQ
1
22020-05ABC 2020-05
32020-1952020-19
42020-252020-25
5
62019ABC 2019-15
72019-15ab cd/ef2019-15
Compare (6)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
M2:M7,Q2:Q7Expression=AND($M2<>"",$M2=RIGHT($Q2,LEN($M2)))textNO
 
Upvote 0
If you want to share a link to an actual file then you need to post it publicly in your thread (see #4 of the Forum Rules) though you should also note that many members are unwilling, or unable due to workplace security settings, to download such files.
So sorry for this. Still being a forum noob I guess. Will read that for sure. Thank you for the heads up.
Based on what you have shown above, see if this does what you want
How do you do the opposite? Trying to see which ones don't match so that I can examine the inconsistencies with the data. Thank you so much.
Here is a sample of what I am trying the code to achieve

DCN and Maximo.xlsx
MNOPQ
1test1test2
22020-05ABC 2020-05 ABC
32020-1952020-19
42020-25MOC 2020-25 MOC 2020-26
52020-05 2 0 2 0 - 0 5
62019-15ABC2019 - 15
72019-15ab cd/ef2019-15
Sheet1
 
Upvote 0
Just change the = in the formula to not equals <>
 
Upvote 0
Code is working perfectly. I do just need one more help for that code. Seems like the code doesnt like it when M field is blank as it is not being highlighted even though there is information in Q. Thank you.
DCN and Maximo.xlsx
MNOPQ
1WO_CMP_NUMWO_DCNSPDCN_IDDCN_CMP_NUM
710722DCN-DATA107222016-33
910722DCN-DATA107222016-33
1010722DCN-DATA107222016-33
1210338DCN-DATA103382016-33
1915486DCN-DATA154862020-05
4015577DCN-DATA155772020-119
5113946DCN-DATA139462020-12
WO-DCN
Cells with Conditional Formatting
CellConditionCell FormatStop If True
O:OCell Valuecontains "DCN-DATA"textNO
N:N,P:PExpression=ISERROR(FIND(","&$N1&",",","&SUBSTITUTE($P1," ","")&","" "))textNO
M:M,Q:QExpression=AND($M1<>"",$M1<>RIGHT($Q1,LEN($M1)))textNO
 
Upvote 0
Hard to keep up with the changes! :(
Previously you told us, on more than one occasion:


Excel Formula:
=$M2<>RIGHT($Q2,MAX(LEN($M2),1))
Thank you so much for all the help that you have provided. This has been so much useful to us. More power to you and more power to this forums. Thank you everyone.
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,796
Members
449,095
Latest member
m_smith_solihull

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