+ Reply to Thread
Results 1 to 14 of 14

Comparing two columns formula help needed

  1. #1
    Registered User
    Join Date
    04-13-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    18

    Comparing two columns formula help needed

    Need help with a formula pretty please?

    Here is my test data:
    COL A / COL B / COL C / COL D / COL E / COL F
    12345678 / T1 / FORMULA / empty / 45678123 / T2
    23456788 / T1 / FORMULA / empty / 77862335 / GH
    34567888 / T2 / FORMULA / empty / 34567888 / AC
    45678123 / T2 / FORMULA / empty / 67812345 / T3
    56781234 / T3 / FORMULA / empty / 56781234 / CD
    67812345 / T3 / FORMULA / empty / 27892375 / PO
    77862335 / T3 / FORMULA / empty / 23456788 / T1
    27892375 / T3 / FORMULA / empty / 12345678 / AB
    77812934 / T3 / FORMULA / empty / 77812934 / X3

    / INDICATES A NEW COLUMN

    The formula will go in Column C. It should show as "Not Converted" if both the data in "col A" and "Col B" is found to be an exact match anywhere in "Col E" and "Col F". If it does not match then it should show as "Converted".

    This is what it should look like when done
    TEST.png
    Last edited by Cubicle Convict; 07-16-2018 at 04:23 PM. Reason: fixed

  2. #2
    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,926

    Re: Comparing two columns formula help needed

    So, an exact match, but not necessarily on the same line?
    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

  3. #3
    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,926

    Re: Comparing two columns formula help needed

    Apologies, just re-read your quesion and looked at the sample again...
    =IF(COUNTIFS($E$2:$E$10,A2,$F$2:$F$10,B2),"not Converted", "Converted")
    copied down

  4. #4
    Registered User
    Join Date
    04-13-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    18

    Re: Comparing two columns formula help needed

    Quote Originally Posted by FDibbins View Post
    Apologies, just re-read your quesion and looked at the sample again...
    =IF(COUNTIFS($E$2:$E$10,A2,$F$2:$F$10,B2),"not Converted", "Converted")
    copied down
    You sir are a gentleman and a scholar. Thank you for the assistance

  5. #5
    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,926

    Re: Comparing two columns formula help needed

    Happy to help, thanks for the kind words and feedback

  6. #6
    Registered User
    Join Date
    04-13-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    18

    Re: Comparing two columns formula help needed

    One more question: is it possible to make the formula output "Not Found" if any of the number sets in COL A are not in COL E?

    It just says "Converted" now and that is not true since it isn't found in E..
    Last edited by Cubicle Convict; 07-18-2018 at 10:47 AM.

  7. #7
    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,926

    Re: Comparing two columns formula help needed

    If I understand you properly, you want it to say Not Found, instead of Converted?

    If so, just swap those words in the formula.

  8. #8
    Registered User
    Join Date
    02-04-2018
    Location
    Israel
    MS-Off Ver
    2013
    Posts
    9

    Re: Comparing two columns formula help needed

    maybe.
    Quote Originally Posted by Cubicle Convict
    ---if any of the number sets in COL A are not in COL E
    silent re columns B,F

  9. #9
    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,926

    Re: Comparing two columns formula help needed

    h2ttp, could you explain what you meant in your post please?

  10. #10
    Registered User
    Join Date
    04-13-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    18

    Re: Comparing two columns formula help needed

    Quote Originally Posted by FDibbins View Post
    If I understand you properly, you want it to say Not Found, instead of Converted?

    If so, just swap those words in the formula.
    Well no, let me explain; the string of numbers in col A is actually a unique id and the two digit code in col B will always be either T1, T2 or T3. That unique string is then run through a program and then output with that same unique id however sometimes it changes the two digit code after it and sometimes it doesn't and also sometimes the unique id doesn't get output from the program at all.

    The Converted is to show those where the unique id has remained the same and the two digit code has changed from T1, T2, or T3 into some other two digit code other than T1, T2, or T3.
    The Not Converted is to show those where the unique id has remained the same and the two digit code has NOT changed from T1, T2, or T3 into something else. It is output as still T1, T2, or T3.
    The Not Found would be for those instances where the unique id was never output from the program and is not found in col E.

    As it is now if the unique id is not found in col E it will just list Converted when really the two digit code hasn't been converted to something other than T1, T2, or T3.

    Does that help?

  11. #11
    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,926

    Re: Comparing two columns formula help needed

    OK yup, understood, give me a few minutes

  12. #12
    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,926

    Re: Comparing two columns formula help needed

    Try this...
    =IF(ISERROR(MATCH(A2,E2:E10,0)),"Not Found",IF(COUNTIFS($E$2:$E$10,A2,$F$2:$F$10,B2),"not Converted","Converted"))

  13. #13
    Registered User
    Join Date
    04-13-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    18

    Re: Comparing two columns formula help needed

    Quote Originally Posted by FDibbins View Post
    Try this...
    =IF(ISERROR(MATCH(A2,E2:E10,0)),"Not Found",IF(COUNTIFS($E$2:$E$10,A2,$F$2:$F$10,B2),"not Converted","Converted"))
    works like a champ, thanks AGAIN !!!

  14. #14
    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,926

    Re: Comparing two columns formula help needed

    Happy to help

+ 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. Formula Comparing Two Columns
    By RosieW in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-22-2017, 04:36 PM
  2. Formula needed for comparing variance to target over time
    By RavenousQbert in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-21-2015, 11:04 AM
  3. [SOLVED] Need formula for comparing columns?
    By Miss Molko in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-18-2014, 08:46 AM
  4. Need help - comparing 2 columns and highlight dupes in one needed
    By ML28 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 03-21-2014, 02:56 PM
  5. Comparing two columns for duplicates formula?
    By istharbgl in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-18-2013, 09:32 AM
  6. Formula Help Needed Please!!Comparing a cell to a column
    By jgkinder in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-28-2013, 06:15 PM
  7. Comparing values in 2 columns - Help needed
    By tilde in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-19-2005, 06:28 PM

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