+ Reply to Thread
Results 1 to 15 of 15

Sheet Comparison

  1. #1
    Registered User
    Join Date
    07-19-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    73

    Sheet Comparison

    I found a macro on the forums that does a lot of what I need but I just need to modify one thing but can't figure it out. I attached a spreadsheet with the macro so you can see what it does.

    The macro compares to different sheets and outputs the differences to the first sheet, 5 cells down from the last row on cell A.

    I would like it to compare the Image1 sheet which has the original data and compare it to the new Image2 sheet with the new data.

    If there is a difference in a cell on the Image2 sheet, transfer it to Image1 sheet next to the corresponding cell on the right. This will allow me to quickly see where there is incomplete data for any of the servers. Hope this makes sense.

    *** There may be other columns added to the spreadsheet that need to be compared so the macro has to compare any amount of columns and place the difference on the next available cell to the right of the matching server name, thanks.
    Attached Files Attached Files
    Last edited by stangz71; 08-02-2011 at 04:39 PM.

  2. #2
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Sheet Comparison

    stangz71,

    Copy the code to a module.
    Run code with sheet Image1 as the active sheet.

    Please Login or Register  to view this content.
    Charles

    There are other ways to do this, this is but 1 !
    Be Sure you thank those who helped.
    IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.

  3. #3
    Registered User
    Join Date
    07-19-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    73

    Re: Sheet Comparison

    I created the macro with the code you posted but when I ran it, it did not do do anything? I tested some of my other macros and they ran fine. Also, does this macro place the differences at the bottom of the first sheet? I have a macro for that, I am looking for a macro that will find the differences between the two sheets and place it next to the cell that corresponds to it on the first sheet. Hope that makes sense, thanks.

  4. #4
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Sheet Comparison

    stangz71,


    I just realized I did not respond to this post. Sorry.
    In the attachment I have my code set to bring over Image2 to image1 if image2 data is not in image1. Not sure if thats what you wanted.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-19-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    73

    Re: Sheet Comparison

    Charles

    I appreciate what you have done but I was looking to move any cells that are different on Image2 sheet, to the right of the corresponding cell on the Image1 sheet. Example below, let me know if this is possible, thanks.

    Image1

    server10_1309420832 2 server10_1309420832 0

    server11_1309420835 2 server11_1309420835 0

    server12_1309421117 2 server12_1309421117 0

    server13_1309420834 2 server13_1309420834 0


    Image2

    server10_1309420832 0
    server11_1309420835 0
    server12_1309421117 0
    server13_1309420834 0

  6. #6
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Sheet Comparison

    Ok,

    I'll have it too your soon.

  7. #7
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Sheet Comparison

    Stan,

    Check too see if this is what you want. I did not code if data not found.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-19-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    73

    Re: Sheet Comparison

    I added the corresponding cells on the Image1 sheet because they were missing in the spreadsheet you attached and then ran the macro and nothing happened? I re-attached the spreadsheet so you can see what I am seen.
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Sheet Comparison

    Stan,

    I need a new pair of glasses. I see what you are referring too.

  10. #10
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Sheet Comparison

    Stan,


    Give this a try.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    07-19-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    73

    Re: Sheet Comparison

    Charles

    It works great but I just realized that if I move even one cell out of order, it will copy everything after that cell to image1 sheet. Is there a way for it to compare no matter the order and only move the corresponding cell that is different. Let me know if that makes sense.

  12. #12
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Sheet Comparison

    Stan,


    This should work. I had part of my code wrong for the find.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    07-19-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    73

    Re: Sheet Comparison

    Charles

    That was exactly what I needed for this type of data. Thanks for all your help, this makes my life much easier when verifying this data each month.

    I can't say how much I appreciate what you and the other guys in this forum do to help others.

  14. #14
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Sheet Comparison

    Thanks, If your satisfied check the scale for the "ReP'

  15. #15
    Registered User
    Join Date
    07-19-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    73

    Re: Sheet Comparison

    Already did, thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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