+ Reply to Thread
Results 1 to 7 of 7

If/Then Data Comparison

  1. #1
    Registered User
    Join Date
    06-22-2010
    Location
    PA
    MS-Off Ver
    Excel 2003
    Posts
    13

    If/Then Data Comparison

    Im at work doing the same tedious work over and over for 18k+ entries and i know excel can do this work for me. here's what i have set up:

    ּ ּ ּ ּ A ּ ּ ּ ּ ּ ּ B ּ ּ ּ ּ ּ ּ C
    01. 101-A.......101-A.......-------.....
    02. 102-A.......103-B.......Error.....
    03. 103-A.......106-A.......-------.....
    04. 104-A.......107-A.......-------.....
    05. 105-A.......109-2........Error.....
    06. 106-A.......113-1........Error.....
    07. 107-A.......115-A.......-------.....
    08. 109-A.....--------
    09. 110-A.....--------
    10. 112-B.....--------
    11. 113-B.....--------
    12. 115-A.....--------

    I need column C to tell me what the discrepancy between column A and B if there is one at all. I have a formula in column C to tell me that they don't match, but i don't know how to to make it pull any information from the other cells:
    =IF(B2=0,"",IF(COUNTIF(A:A,B2),"",IF(ISERROR(FIND(LEFT(B2,3)*A:A,2))=TRUE,"Error","")))

    NOTE: this is an extremely simplified example; my document has far more numbers, mixed with some letters in each field. Macro's are also not an option unfortunately. Aligning column B to column A also isn't an option because there are some fields in column B that just don't exist in Column A
    Last edited by NBVC; 06-23-2010 at 10:42 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If/Then Data Comparison

    but i don't know how to to make it pull any information from the other cells:
    Not sure what you mean... what do you want the results to be? and why/how?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,029

    Re: If/Then Data Comparison

    Will this be ok for you:

    =IF(C2="", "", IF(COUNTIF(B:B, C2)=0, "Error", ""))
    Never use Merged Cells in Excel

  4. #4
    Registered User
    Join Date
    06-22-2010
    Location
    PA
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: If/Then Data Comparison

    ּ ּ ּ ּ A ּ ּ ּ ּ ּ ּ B ּ ּ ּ ּ ּ ּ C
    01. 101-A.......101-A.......-------.....
    02. 102-A.......103-B.........A.......
    03. 103-A.......106-A.......-------.....
    04. 104-A.......107-A.......-------.....
    05. 105-A.......109-2..........A.......
    06. 106-A.......113-1..........B.......
    07. 107-A.......115-A.......-------.....
    08. 109-A.....--------
    09. 110-A.....--------
    10. 112-B.....--------
    11. 113-B.....--------
    12. 115-A.....--------

    This is what i want to to be. It has to pull the information BEFORE the "-" in column B to find the same information BEFORE the "-" in column A, then grab the information AFTER the "-" and transfer it to column C

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,029

    Re: If/Then Data Comparison

    I belive red should be in first column after 103-A, right?

    this maybe?
    Attached Files Attached Files

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If/Then Data Comparison

    Try in C2:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-22-2010
    Location
    PA
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: If/Then Data Comparison

    Quote Originally Posted by NBVC View Post
    Try in C2:

    Please Login or Register  to view this content.
    That worked PERFECTLY!! thank you so much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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