+ Reply to Thread
Results 1 to 19 of 19

Compare cell by cell in sheets

  1. #1
    Registered User
    Join Date
    08-23-2011
    Location
    East
    MS-Off Ver
    Excel 2007
    Posts
    60

    Compare cell by cell in sheets

    hi all..i had a query regarding comparing cells which contains text in col A in worksheet 1 and cells with text in col A in worksheet2...i want a vba code to run for,compare each cell by cell in worksheet 1 with the cells in worksheet2 and copy,paste the matched cells in a new sheet named "copied" data....

    P.S. worksheet1 contains repetitive text in colA

    attached a sample worksheet.
    Attached Files Attached Files
    Last edited by slashdot; 08-29-2011 at 02:54 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Compare cell by cell in sheets

    It would be much faster to use formulas
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-23-2011
    Location
    East
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Compare cell by cell in sheets

    hmmm.its ok but i want to learn vba.i could not loop each cell perfectly.so was looking for the same....pls help me..

  4. #4
    Registered User
    Join Date
    08-23-2011
    Location
    East
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Compare cell by cell in sheets

    i think i need to use compstr in column A of worksheet 1 with column A of worksheet 2 cell by cell....

  5. #5
    Valued Forum Contributor gjlindn's Avatar
    Join Date
    08-01-2011
    Location
    Dodgeville, WI
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    369

    Re: Compare cell by cell in sheets

    Could you update your example to include what you want the output ("Copied" worksheet) to look like?
    -Greg If this is helpful, pls click Star icon in lower left corner

  6. #6
    Registered User
    Join Date
    08-23-2011
    Location
    East
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Compare cell by cell in sheets

    i had created the COPIED worksheet to copy paste all the items that match with sheet 2....i had tried writing the code but could not find it in my uploaded sheet...i m not sure that my office proxy had deleted it or not.?

  7. #7
    Registered User
    Join Date
    08-23-2011
    Location
    East
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Compare cell by cell in sheets

    hello sirs,,,kindly tell me how can i complete this query..

  8. #8
    Registered User
    Join Date
    08-23-2011
    Location
    East
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Compare cell by cell in sheets

    more than 3days no solution.hope it is not that much impossible..

  9. #9
    Valued Forum Contributor gjlindn's Avatar
    Join Date
    08-01-2011
    Location
    Dodgeville, WI
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    369

    Re: Compare cell by cell in sheets

    Quote Originally Posted by gjlindn View Post
    Could you update your example to include what you want the output ("Copied" worksheet) to look like?
    Sorry slashdot. I'm still waiting for the example of how you want the output to look. Your workbook doesn't have any vba code in it...you might get more support if it at least appeared you had first attempted coding this yourself as well. Just a suggestion. Thanks!

  10. #10
    Registered User
    Join Date
    08-23-2011
    Location
    East
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Compare cell by cell in sheets

    Thanks ,,gjlindn for that great reply.sorry i forgot to upload the example...will upload the example with in few minutes...

  11. #11
    Registered User
    Join Date
    08-23-2011
    Location
    East
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Compare cell by cell in sheets

    hmmm.after a great struggle and searching from many codes & examples in vba.i could make out my problem but could not finish it.not sure,i m bowled out in the last lines of code...

    i m very new to coding & all the credits to the original coders from where i had copied the code..


    attached the updated version of example with vba code.....
    Attached Files Attached Files

  12. #12
    Valued Forum Contributor
    Join Date
    11-11-2008
    Location
    Euro
    MS-Off Ver
    2007, 2010
    Posts
    470

    Re: Compare cell by cell in sheets

    There is no any code-line in your attached file?

    In the result sheets (copies), why there exists "south american" in cell A4 that is not match any record in Src sheet?

    how many records is there in your database?
    and The records in the column A in Sheet Mast are unique?
    Best regard, -)iger-/iger
    If you are pleased with a solution mark your post SOLVED.

  13. #13
    Registered User
    Join Date
    08-23-2011
    Location
    East
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Compare cell by cell in sheets

    Sorry dude,,i had attached the example with code.but again its getting deleted..i could not find the reason....

  14. #14
    Registered User
    Join Date
    08-23-2011
    Location
    East
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Compare cell by cell in sheets

    mr.tiger there is no such word like"southamerican"as quoted by you in my example sheet.

    to the number of records question:my worksheet contains not less than 4000 lines everyday.

  15. #15
    Registered User
    Join Date
    08-23-2011
    Location
    East
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Compare cell by cell in sheets

    Here is the sample code i had copied and tried adjusting to my requirements.pls tell me what more to be added.
    Please Login or Register  to view this content.

  16. #16
    Valued Forum Contributor gjlindn's Avatar
    Join Date
    08-01-2011
    Location
    Dodgeville, WI
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    369

    Re: Compare cell by cell in sheets

    Here you go!
    Please Login or Register  to view this content.
    Good luck!
    Last edited by gjlindn; 09-02-2011 at 01:29 AM. Reason: Corrected boolean to Long

  17. #17
    Registered User
    Join Date
    08-23-2011
    Location
    East
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Compare cell by cell in sheets

    Thanks mate..that was a rocking one..

  18. #18
    Valued Forum Contributor gjlindn's Avatar
    Join Date
    08-01-2011
    Location
    Dodgeville, WI
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    369

    Re: Compare cell by cell in sheets

    You're welcome If that's working for you, would you mind marking this thread as SOLVED? Also, if you wouldn't mind, it would help me out if you'd click the scales to the right of my post. Thanks and have a great day!

  19. #19
    Valued Forum Contributor
    Join Date
    11-11-2008
    Location
    Euro
    MS-Off Ver
    2007, 2010
    Posts
    470

    Re: Compare cell by cell in sheets

    Try to a new approach,

    see the attached file, and Plz confirms the code is appropriate for your case or not
    Attached Files Attached Files
    Last edited by tigertiger; 09-03-2011 at 08:27 AM.

+ 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