Consulting

Results 1 to 8 of 8

Thread: =IF(J2=B2,"Match","") ???

  1. #1
    VBAX Regular
    Joined
    Jun 2016
    Posts
    17
    Location

    =IF(J2=B2,"Match","") ???

    Help with this would be appreciated please

    Exactly what the header says but IF found put "Y" in D column where rows match

    Text in both columns are text
    Neither Column is sorted
    to complicate things is that col B text has a number + space in front of text like following text
    1. Single Spirit
    What I am trying to say is this if J2 text = Single Spirit put Y in D column
    but I need to use =MID(B2,FIND(".",B2)+1,256) or something like this I guess

    Regards
    Graham

  2. #2
    Hello Graham,
    What are you searching for? Your code compares the value of J2 and B2. The way you wrote it, IF J2=J3, enter the string "MATCH", else enter nothing.
    When I try to have code compare two values and enter a third value in another cell I first define what I am comparing first. Then I can decide whether to to use and IF, MID or an UDF.
    Care to give me a little more detail, or a brief example?

  3. #3
    VBAX Regular
    Joined
    Jun 2016
    Posts
    17
    Location
    Hi Jack, let me try to put this simply.
    I have included a snapshot which may help
    I have changed column J for another one which u will see.

    Graham
    Match-Text.jpg

  4. #4
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi Feebles
    Why not post a sample workbook, rather than expecting us to replicate what you already have?
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  5. #5
    VBAX Regular
    Joined
    Jun 2016
    Posts
    17
    Location
    Very good idea, and here is a small attachment
    Regards
    Graham
    Col C is hidden
    Attached Files Attached Files

  6. #6
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    =IF(ISNA(MATCH(TRIM(RIGHT(B2,LEN(B2)-FIND(". ",B2))),E:E,)),"","Y")
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  7. #7
    VBAX Regular
    Joined
    Jun 2016
    Posts
    17
    Location
    That is absolutely Brilliant
    Thank you very much mdmackkillop
    Appreciate it and from now on I will include a sample sheet
    Regards
    Graham

  8. #8
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Please remember to mark your posts "Solved" using Thread Tools
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

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