+ Reply to Thread
Results 1 to 13 of 13

Need help to compare data & display it in a particular format

  1. #1
    Registered User
    Join Date
    08-11-2010
    Location
    Chennai ,India
    MS-Off Ver
    Excel 2003
    Posts
    15

    Need help to compare data & display it in a particular format

    Hi,

    I would like to get the data displayed in a particular format in the column "Result" comparing two columns.I need to compare the values in Column A with the values in Column C when these values match then the values in Column B needs to be compared in Column D .When Column B and Column D matches the result must be displayed as "Same" ,When Column B doesn't match with Column D matches the result must be displayed as "Changed". When Column A doesn't match with Column C then the value must be displayed as "New"..

    Note: The value in column A can match with the value in the column C at any instance , they can be present in the column C at any instance

    Any help is appreciated
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Need help to compare data & display it in a particular format

    Not sure if I understand correctly, because I get a different answer for G5. (Don't know why it is "same").

    But this is my suggestion.

    Please Login or Register  to view this content.
    I hope this helps, please let me know!

    Regards,

    David

    If this has been helpful
    - Please click on the *Add Reputation button at the bottom left.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".


  3. #3
    Registered User
    Join Date
    08-11-2010
    Location
    Chennai ,India
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Need help to compare data & display it in a particular format

    Thanks for your reply sir..

    This works out but i have a clause that the cell contents need not match exactly in the same row.In the attached excel the contents A6 & B6 match with C5 & D5 .In that case the result would be "Same" for G6.

    The contents in C6&D6 may match with the contents on A7 &B7 (i have not included the contents for A7 & B7)

    Any help in this regard is highly appreciated

    Thanks Much

  4. #4
    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: Need help to compare data & display it in a particular format

    Try this...
    =IF(ISERROR(MATCH(D2&E2,INDEX($A$2:$A$6&$B$2:$B$6,0),0)),IF(ISERROR(MATCH(D2,$A$2:$A$6,0)),"New","changed"),"Same")
    copied down
    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

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Need help to compare data & display it in a particular format

    @ FDibbins,

    I trust you thanked your wife for helping you with that formula, since you can hardly sum 1+2!
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  6. #6
    Registered User
    Join Date
    08-11-2010
    Location
    Chennai ,India
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Need help to compare data & display it in a particular format

    Thanks for your reply sir..

    This doesn't work out as Im getting an error ..
    Attached Images Attached Images
    Last edited by ash81sen; 01-21-2019 at 04:09 PM.

  7. #7
    Registered User
    Join Date
    08-11-2010
    Location
    Chennai ,India
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Need help to compare data & display it in a particular format

    Quote Originally Posted by FDibbins View Post
    Try this...
    =IF(ISERROR(MATCH(D2&E2,INDEX($A$2:$A$6&$B$2:$B$6,0),0)),IF(ISERROR(MATCH(D2,$A$2:$A$6,0)),"New","changed"),"Same")
    copied down

    See the reply above sir...

    any help in this regard is highly appreciated sir

  8. #8
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Need help to compare data & display it in a particular format

    I don't get it!

    I tried Ford's formula and it worked, yours SEEMS to be the same, but I can't spot why it isn't working.

    Please attach the actual sheet which is failing - perhaps we van then spot the reason.

    Regards,

    David

  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: Need help to compare data & display it in a particular format

    @ Winon, even if I could, you still wouldnt know if the answer was right or wrong

    @ ash, I tried my formula again, and it was still working - on your sample data. What isnt working?

  10. #10
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Need help to compare data & display it in a particular format

    @ FDibbins,

    Winon, even if I could, you still wouldnt know if the answer was right or wrong...
    That is not fair! What is the answer?

  11. #11
    Registered User
    Join Date
    08-11-2010
    Location
    Chennai ,India
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Need help to compare data & display it in a particular format

    I tried on the same excel sheet which i attached ...

    I am using Excel 2016 ...has it got anything to do with Office versions?

  12. #12
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Need help to compare data & display it in a particular format

    @ash81sen

    It has nothing to do with versions. I am using XL2016 as well. I simply cut and pasted FDibbin's formula and it works. If you tried to type it, you may have missed a comma or something.

    As I said before - supply a copy of the problem worksheet.
    Attached Files Attached Files

  13. #13
    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: Need help to compare data & display it in a particular format

    @ David, thanks for the double-check

+ 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. [SOLVED] More data identification formula questions - Compare, Validate and Display
    By Doofus1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-14-2018, 02:48 PM
  2. [SOLVED] Need to compare and display the data in file
    By Regina HR in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-22-2017, 03:14 PM
  3. Replies: 2
    Last Post: 12-07-2016, 02:02 AM
  4. Replies: 2
    Last Post: 07-13-2015, 07:27 PM
  5. [SOLVED] Compare data and display differences
    By jennifer5765 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-18-2012, 09:35 AM
  6. How to compare data between 2 worksheets and display the differences
    By melvyndb in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-02-2012, 02:48 AM
  7. Compare and display data with met criteria.
    By SER01 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-03-2009, 07:52 AM

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