+ Reply to Thread
Results 1 to 53 of 53

Name check / data validation formula

  1. #1
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Name check / data validation formula

    Hi Folks,
    I have a new question about validating or identifying incorrect data.
    I have uploaded an example spreadsheet.
    I have about 100,000 lines of such data to work with.
    So, I would like to know if anyone can provide me a formula that I can copy and past down to solve my problem.

    The issue is this:
    The last name of the Actor in cell F4 must match with the last name of data in cell G3.
    If the names match, in cell H3, it needs to return "OK" else "NO"

    The formula would then have to skip F5:G6 and search for a data match in cells F8 and G7
    in the example provided, there is a typo in the last name in cell G7. So, the returned answer in H7 will be "NO"

    I am looking for a formula, that I can copy and paste down for about a 100,100 such entries - to search for typos and name discrepancies.
    All the entries are separated by the two blank cell spaces.

    Any assistance would be appreciated.
    Thank you
    Doofus
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Name check / data validation formula

    If cells like F4 are always the same format (i.e. the bit you are interested in is everything after the first 7 characters), then how about this formula in H3:

    =IF(RIGHT(F4,LEN(F4)-7)=RIGHT(G3,LEN(F4)-7),"OK","NO")

  3. #3
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi Nick Williams,
    It almost works.
    I wanted to see the formula without the additional #VALUE and "NO" returns in I 4,5 and 6.
    So, rewrote it as:

    =IFERROR(IF(RIGHT(F4,LEN(F4)-7)=RIGHT(G3,LEN(F4)-7),"OK","NO"),"")

    But I still see an additional "NO" in J6, J10 etc.
    How do I remove that ?
    Thank you
    Doofus
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: Name check / data validation formula

    You could bowl in an extra IF statement (copy into cell J3):

    =IFERROR(IF(F3="","",IF(RIGHT(F4,LEN(F4)-7)=RIGHT(G3,LEN(F4)-7),"OK","NO")),"")

  5. #5
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi The_Snook,
    Wang, Dang, Doodle - that works!!!
    Thank you
    Doofus

  6. #6
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Name check / data validation formula

    Ah ok I didn't appreciate you wanted the formula in every row.

    How about this?

    =IF(LEFT(G3,5)="Title",IF(RIGHT(F4,LEN(F4)-7)=RIGHT(G3,LEN(F4)-7),"OK","NO"),"")

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    @Doofus

    Do NOT open any more threads on this. You have now asked essentially the same question in three threads. If you have any further questions on checking and matching names between columns, ask them HERE.

    I will close any further threads I find on this issue. These questions are not different enough to warrant separate threads. I hope I have made myself clear.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi AliGW,
    Sorry about the mass confusion about the multiple threads.
    To you, they are all the same and simple. To me, they are bigger problems than anything Einstein ever thought of.

    So, I have questions about a formula you provided - in the prior /closed thread:

    =IF(ISNUMBER(FIND(MID(B3,FIND(" ",B3)+1,99)&", "&LEFT(B3,FIND(" ",B3)-1),C3)),"OK","NO")

    What is the purpose of the +1, -1 and the 99 ?

    I think i get it that the formula is matching the data in the cells.
    But what is the purpose of those digits?
    Sorry about the dumb question.

    Also, if anyone else wishes to add to my education on an explanation of what the formula is meant to do, feel free to add.
    Thank you
    Doofus
    Last edited by Doofus1; 03-03-2022 at 10:11 PM.

  9. #9
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi Folks,
    I have another related question.
    This is about extracting a name that always appears between certain words and abbreviations/symbols etc.
    I have uploaded an Excel file to show how I want to extract the information.
    I've looked at some Youtube videos - but they seem to be about extracting names from e-mail addresses and so, not much use.
    In my issue, the names to be extracted will always appear after the words "written by" and before "(RE: related document(s)"
    I have about 200,000 lines of data from which to extract the name.
    Does anyone know of a formula that use to enter in the first cell and copy down - to extract the data?
    Thank you all
    Doofus

    Or if anyone knows of a Youtube video that answers the question, please provide a link - if it is acceptable per whatever forum rules are not violated.
    Attached Files Attached Files
    Last edited by Doofus1; 03-04-2022 at 12:25 AM.

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Name check / data validation formula

    Doofus it appears that you mistakenly gave The_Snook a neg rep, instead of a pos rep - I have rectified that for you
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  11. #11
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi FDibbins
    Thank you!!
    My apologies to The_Snook.
    He/She helped me immensely.
    Please note that my day isn't complete unless I do something, dumb , that lives up to my moniker..
    Thank you
    Doofus
    Last edited by Doofus1; 03-04-2022 at 02:07 AM.

  12. #12
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi, The_Snook,
    My apologies. I guess I hit the wrong button - I got excited with your answer/solution
    YOU HELPED ME IMMENSLEY.
    I hope you can forgive my oversight.
    Best regards
    Doofus
    Last edited by Doofus1; 03-04-2022 at 02:08 AM.

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    =IF(ISNUMBER(FIND(MID(B3,FIND(" ",B3)+1,99)&", "&LEFT(B3,FIND(" ",B3)-1),C3)),"OK","NO")

    The +1 tells Excel to find the letter after the first space in B3. -1 means the letter before the space. 99 is the number of letters after the found letter to return.

    I suggest you use the Evaluate Formula function on the Formulas ribbon to step through the formula to understand what it is doing.

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    For your latest query on a recurring theme, try this:

    =TRIM(LEFT(SUBSTITUTE(MID(A2,FIND("written by",A2)+11,99),"(RE:",REPT(" ",99)),98))

  15. #15
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi AliGW
    Thank you.
    I didn't understand the meaning of the 99.
    The explanation helps
    Best
    Doofus

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    You're welcome.

    As I said, take the time to run each of these name extraction formulae through the Evaluate Formula feature - it will begin to help demistify the mechanics for you. You might even be able to start building your own versions instead of coming straight back here asking for the nexat adaptation.

  17. #17
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi AliGW,
    This is why you "Da Man!!"
    I hope that I am not violating any gender pronoun forum rules by saying that.

    I came up with a formula too:
    =MID(A2,FIND("written by",A2)+10,FIND("(RE:",A2)-FIND("written by",A2)-10)

    Does this work too or, could there be any hidden pitfalls in my formula ?
    Best
    Doofus

  18. #18
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    Yes, there is an issue with yours: it leaves you with a leading space at the beginning of the text string it returns. Study mine to see what you could add to make that leading space go away.

    You should be aware that, as a retired teacher, I do like to see people learning and beginning to apply what is learnt.

  19. #19
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Thank you!!
    Will work on that formula.
    I am a lifelong slow but determined learner.
    My interactions with this forum and its contributors are the closest I'll come to experiencing heaven on this planet.
    Thank you all
    Doofus

  20. #20
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    This is why you should keep all these very similar requests together: it's easier for those helping you to see what you have already been told and to help you adapt and build on the tricks we share with you.

  21. #21
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi Folks,
    And now, I have another question related to previous issues.
    I have uploaded an excel spreadsheet with the issue.

    In cell B3, I have typed my formula =MID(A3,FIND("written by",A3)+11,FIND("(RE:",A3)-FIND("written by",A3)-11)
    to extract a name from text in cell A3.

    However, in cells A4,A5 and A6 there is no data that matches that criteria and so, I'd like to skip the cells associated with formula in cells B4,B5 and B6 and move on to cell B7, B11, B15 etc

    I could use an IFERROR formula and type =IFERROR(MID(A3,FIND("written by",A3)+11,FIND("(RE:",A3)-FIND("written by",A3)-11),"")
    and make the #VALUE! message disappear.

    However, is there a way or is there a formula that can skip the unwanted cells and move, automatically, to the required/designated cells ? So that, when I copy down and paste, it misses/disregards those cells.
    The data files have about 400 to 600,000 such lines - I have uploaded a small mock up of the relevant part of the file.

    All/any input is welcome.
    Thank you
    Doofus
    Attached Files Attached Files
    Last edited by Doofus1; 03-04-2022 at 09:33 PM.

  22. #22
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    No - IFERROR is the correct approach.

    To apply a formula only to certain rows would require VBA.

  23. #23
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi AliGW,
    Dang!!
    I couldn't find anything else.
    Thank you. Will use the IFERROR function.
    Best
    Doofus

  24. #24
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi Folks,
    I have another question.
    Please look at SHEET 2 of the uploaded Excel file.
    The issue is this:
    Starting in cell B4, there is a name that appears after the text "Written by".
    This data appears in every 5th cell down column B.
    In some instances, the 5th cell is blank.
    When that occurs, I need the text in the next cell, in column C to read "Missing data" AND to take all the text from 5 cells above in column B AND to add it after the "Missing Data" text
    I don't know how to write this.
    Any help would be apprecaited
    Thank you
    Doofus
    Attached Files Attached Files

  25. #25
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    What should happen if the next one is also empty? Or will there only ever be one at a time? Will the numbers be in column A, or is this for illustration purposes? What will be in the rows between?

    This is not a complete sample: I think you have over-simplified it, so any suggestions will most likely fail on the real data.

    I won't look at this until you've provided much more realistic sample data - sorry.
    Last edited by AliGW; 03-05-2022 at 04:17 AM. Reason: Typo fixed.

  26. #26
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi AliGW,
    Good question about the missing data.
    So far, I have not encountered an instance of missing data in two such consecutive cells.
    Although, as a precaution, it could be written to look at the data in 10 cells back/above.
    The numbers in column A are for illustration purposes.
    In the rows between there is other data eg year, significant works by authors, movie adaptations etc
    I have left all of that out of the spreadsheet - because identifying the missing data in each 5th cell is what I am after - because it is always related to the name of the author found 5 cells above.
    In the rare instance that the data is missing in two such cells, it will have to be related to the data 10 cells above - but I have not encountered such an instance - as yet.
    I have about 500,000 such lines to test.
    This would be a quick fix to figure out where such discrepancies occur.
    Thank you
    Doofus

  27. #27
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    In C4 copied down:

    =IF(LEFT(B4,10)="Written by",B4,IF(MOD(ROWS(B$4:B4),5)=1,"Missing data / "&LOOKUP(2,1/(C$1:C3<>""),C$1:C3),""))

    EDIT: This may NOT work because of this:

    In the rows between there is other data eg year, significant works by authors, movie adaptations etc
    Come on, Doofus - you should at least know by now that we need REALISTIC sample data, not lazy examples. This is truly exasperating, especially as you expect US to do most of the leg work for you. I'm not in the mood to waste time today, so please put together a REALISTIC data sample and I will have another look. If you don't, then good luck to you!!!
    Attached Files Attached Files
    Last edited by AliGW; 03-05-2022 at 04:37 AM. Reason: Workbook attached.

  28. #28
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi AliGW,
    Sorry about that.
    I don't have access to those files right now.
    Would get you a better sample - but that will have to wait until Monday.
    In the meantime, lets take a break - it's bed time for Bonzo.
    I only provided that mock up file because - I wanted to have my ducks lined up in a row (no actual ducks were harmed in that statement).
    Will continue tomorrow.
    Best to all for now
    Doofus.

  29. #29
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    Well, at least tell me if my solution works on your real data.

    Where in the world are you?

    Administrative Note:

    Although we value your privacy as much you do, it could be important that members have a rough idea of your location as the solutions they offer may be affected by your locale. For instance, you might in the future post questions which are related to your regional settings.

    With this in mind, please update your profile to something more precise (something such as UK, Europe, USA, UAE, etc. will suffice).

    Thank you for helping us to help you.

  30. #30
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi AliGW,
    Yes, it works.
    Thank you!!
    Will get back on this evening (US Pacific Standard Time).
    Gotta run.
    Best
    Doofus

  31. #31
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi Folks,
    I have another question about matching data.
    I have uploaded an Excel file. Please look at SHEET 3.
    I am trying to match the data in all three cells so that I get a"YES" or "NO" answer in cell column D based, ideally, on the last name.

    My idiot formula =IF(AND(A2=B2=C2),"OK","NO") does not work.

    Can someone show me a formula or formulas that works for this type of issue?

    *The text (CR) and (MA) do not matter.

    The names will always appear in this format - and there are thousands of data rows to check.

    I cannot figure out how to write the formula because on column C, it is last name first.

    I need to copy the formula down, so that I can get the answer and then filter to check - so that I can have them corrected.
    Best
    Doofus
    Attached Files Attached Files
    Last edited by Doofus1; 03-06-2022 at 04:51 PM.

  32. #32
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,197

    Re: Name check / data validation formula

    SECURI will not let me post the VBA code !!!!
    Attached Files Attached Files
    Last edited by JohnTopley; 03-06-2022 at 05:55 PM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  33. #33
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    I cannot figure out how to write the formula because on column C, it is last name first.
    You should do. It was dealt with in I think the first if your three threads on this stuff. I gave you the formula for comparing names in different formats. It's clear from this latest request that you haven't even attempted to use it or any if the several variants you've been given.

  34. #34
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi AliGW,
    Tried using = IF(ISNUMBER(FIND(MID(A3,FIND(" ",A3)+1,99)&", "&LEFT(A3,FIND(" ",A3)-1),B3)),"OK","NO")
    to search for A and B.
    and I was hoping to use it to check for B and C .
    That would have created two "Yes" "NO" columns.
    But I have got messed up.
    Hence request for assistance.
    Thank you
    Doofus
    Last edited by Doofus1; 03-06-2022 at 09:55 PM.

  35. #35
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi JohnTopley,
    Long time no hear, Sir.
    Thanks for the VBA code - but you are flying and I am crawling.
    You leave me with more questions than I can ever answer or understand
    However, I don't quite know how to get that code onto the files I am checking (Work environment does not permit me to upload their files or use any code etc that isn't approved by the IT Department (office politics) etc
    I was looking or a formula that I could write - once I had copied the data onto an Excel sheet.
    Best regards
    Doofus

  36. #36
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi Folks,
    Be back in a while - gotta run an errand.
    If anyone has an answer, will check back in a few hours.
    Bye
    Doofus.

  37. #37
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    OK. Here's another variation on a theme:

    =IF(AND(A2=B2,SUBSTITUTE(SUBSTITUTE(MID(A2,FIND(" ",A2)+1,99)&", "&LEFT(A2,FIND(" ",A2)-1),"(MA) ","")," (CR)","")=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(C2," (MA)","")," (CR)",""),"(",""),")","")),"OK","NO")

  38. #38
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,197

    Re: Name check / data validation formula

    Slight mod to Ali's formula: added TRIM

    =IF(AND(A2=B2,TRIM(SUBSTITUTE(SUBSTITUTE(MID(A2,FIND(" ",A2)+1,99)&", "&LEFT(A2,FIND(" ",A2)-1),"(MA) ","")," (CR)",""))=TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(C2," (MA)","")," (CR)",""),"(",""),")",""))),"YES","NO")

  39. #39
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    Good call, John. Amended WB attached.

  40. #40
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi JohnTopley,
    AMAZING!!!
    Words fail me.
    Thank you
    Doofus

  41. #41
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    OK - I did the leg work, but never mind!

    Please mark this as solved.

  42. #42
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi AliGW,
    Thank you for helping me.
    I do try to work with the formulas that you and the everyone else has been so kind to provide.
    However, I am not the greatest Excel logician - nor do I have much time to think things through.

    I know what I want to achieve but lack the technical skill to achieve it - which is why I come to this Forum.

    Everyone on this site gives me knowledge and insight into what is possible (which, sometimes is a dangerous thing - given the way my mind wanders)

    As a teacher, I must tell you that I used to consider myself a teachers pet - because they used to keep me in a cage.

    Best regards
    Doofus

  43. #43
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    I don't think you understood the comment. Read posts #37 to #39 again and you may understand.

    However, I am not the greatest Excel logician - nor do I have much time to think things through. ...
    I know what I want to achieve but lack the technical skill to achieve it - which is why I come to this Forum.
    Which is fine, however you MUST remember that this is a HELP forum, not a DO IT ALL FOR YOU forum. We should be helping to steer YOU to a solution, rather than constantly providing solutions for you. You are beginning to stretch my patience in this respect.

    If you don't want to get your hands dirty (and suggesting that you had tried =IF(AND(A2=B2=C2),"OK","NO") in the context of everything that had gone before tells me very clearly that you don't), then perhaps you should consider purchasing points in the Commercial Services section where someone will happily do the work for you to your brief.

    Just sayin' ...
    Last edited by AliGW; 03-07-2022 at 04:56 AM. Reason: Typo fixed.

  44. #44
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi AliGW,
    Understood.
    Will check out the Commercial Services section - but I need to have enough money to live, first.
    =IF(AND(A2=B2=C2),"OK","NO") was a joke - because I know that it ain't that easy (for me).

    Best regards
    Doofus

  45. #45
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi Mr Topley,
    I tried your formula on one set of data - (for series characters). It worked like a charm.
    I then tried it on a different list - for data entry personnel.

    =IF(AND(A2=B2,TRIM(SUBSTITUTE(SUBSTITUTE(MID(A2,FIND(" ",A2)+1,99)&", "&LEFT(A2,FIND(" ",A2)-1),"(SA) ","")," (TR)",""))=TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(C2," (SA)","")," (TR)",""),"(",""),")",""))),"YES","NO")

    The only adjustments I made were for (SA) and (TR)

    It does not produce the required answer.

    I have uploaded an Excel sheet.
    Column D has the formula and column E shows the desired result.
    Could you look at the formula and check to see what I am doing wrong?
    Also, anyone else who is willing to review the sheet is welcome to add their input.
    Thank you
    Doofus
    Attached Files Attached Files
    Last edited by Doofus1; 03-07-2022 at 11:24 PM.

  46. #46
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    You have swapped columns B and C around and in some rows you have different values in all three columns.

    My formula was built on the basis of the previous dataset, where in all cases A and B were the same. The goalposts have shifted - again.

    I'm out.

  47. #47
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,197

    Re: Name check / data validation formula

    As per Ali's reply: if you change the goalposts you cannot expect Excel to accommodate this automatically so yet again you have wasted contributors time.

    If you want Ali's formula ( - she did all the hard work so that is where the credit belongs - ) to work then first swap the columns B & C as per the original post.

    Further, again noted by Ali, the data has also changed e.g. Jenny Silberman (TR) (Silberman (TR), Jenny) Jenny K Silberman (TR) - so your sample was not very representative. Comparing data such as this is not as easy as it might appear to the human eye. I have not tried to see the impact on the formula but suspect it is not trivial.

    Even the VBA solution I provided will also need changes: I appreciate VBA is not always allowed.

    And why are these differences occurring? - "Prevention is better than cure"
    Last edited by JohnTopley; 03-08-2022 at 03:54 AM.

  48. #48
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Name check / data validation formula

    For Excel2013+
    Maybe try

    =IF(ROWS(FILTERXML("<x><m>"&SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2&" "&B2&" "&C2,"(",),")",),",",)," ","</m><m>")&"</m></x>","//m[string-length(.)>2][not(preceding::*=.)]"))=2,"YES","NO")
    Attached Files Attached Files

  49. #49
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Dear AliGW,
    My SINCERE apologies for not having credited you for the effort you put into working that formula for me.
    Thank you for creating the original formula.
    Yes, the goal posts shift.
    As I mentioned, in the post to JohnTopley, it worked with the original data set - but I couldn't get it to work with the second data set.
    Hence, the new request to look at the data, again.
    The data consists of names.
    The target/goal posts keep moving because of things I discover in the data - as I sift through them - it's pretty thankless at my end too.
    Eg in column A =, it is first name (a marker abbreviation) last name (another marker abbreviation)
    In column B = it could be first name or last name, brackets, marker abbreviations in the middle and at the end.
    In column C = first name, (marker abbreviation for some) last name (marker abbreviation)

    What I'd like to figure out is how to disregard the brackets, the marker abbreviations and the check the data by last name and then first name - if that is possible.
    I apologize for my disregard for the work you did.
    Thank you
    Doofus.

  50. #50
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,807

    Re: Name check / data validation formula

    I did start working on this, but Bo_Ry has provided a better alternative. I won't be offering any further help on this - sorry.

    The target/goal posts keep moving because of things I discover in the data - as I sift through them - it's pretty thankless at my end too.
    Take a step back: do ALL of your data sifting first, then present sample data that covers ALL eventualities. It simply is NOT fair on those giving generously of their free time to help you to keep expecting them to reinvent the wheel because you have spotted yet another anomaly. Your helpers' good will only gets you so far: you can begin to abuse it if you are not careful.
    Last edited by AliGW; 03-08-2022 at 05:28 AM. Reason: Typo fixed.

  51. #51
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi Bo_Ry,
    Thank you for the time spent on this.
    I will get back to you in about 12hrs - when I test this at work.
    Right now, its about 1:30 am in the morning.
    Gotta get some sleep.
    Best regards
    Doofus

  52. #52
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: Name check / data validation formula

    Hi Bo_Ry,
    That worked!!
    Thank you very much.
    Sorry, I couldn't respond earlier - spent the day at the DMV (Dept of Motor Vehicles).
    Just got into work.
    Best regards.
    Doofus

  53. #53
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: Name check / data validation formula

    Quote Originally Posted by Doofus1 View Post
    Hi, The_Snook,
    My apologies. I guess I hit the wrong button - I got excited with your answer/solution
    YOU HELPED ME IMMENSLEY.
    I hope you can forgive my oversight.
    Best regards
    Doofus
    Hi Doofus,

    No problem at all, I knew it was an accident and you hadn't turned bandit on me!

    Regards,

    Snook

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to check if custom data validation formula is volatile?
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-08-2021, 07:04 AM
  2. Replies: 7
    Last Post: 02-12-2016, 01:54 PM
  3. Data validation check
    By amt7565 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-09-2014, 10:12 AM
  4. Data Check and Validation
    By Nairobi Nice in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-20-2012, 08:29 AM
  5. How to use Data Validation to check?
    By gilbert in forum Excel General
    Replies: 3
    Last Post: 06-09-2011, 09:11 PM
  6. Data Validation Check
    By james598 in forum Excel General
    Replies: 0
    Last Post: 07-22-2009, 11:59 AM
  7. Validation Formula To Cross Check Cells
    By swordswinger710 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-22-2008, 10:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1