+ Reply to Thread
Results 1 to 3 of 3

how to compare morethan one cell in macro

  1. #1
    Registered User
    Join Date
    12-02-2009
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    16

    how to compare morethan one cell in macro

    Hi all, I am trying to write macro for the below condition. But i could not make it??? Plz help me with your ideas..

    Sheet 1:
    Col A Col B Col C Col D
    1 ABC 12/01/2009 413543 7
    2 --------
    3 --------

    Sheet 2:
    Col A Col B Col C Col D
    1 BDC 12/01/2009 413873 4
    2 ABC 12/01/2009 413543 7


    I have data as mentioned above. I want to compare the row 1 in sheet 2 with each row in the sheet1 and and check whether any of the row in sheet 1 is matching the row in sheet 2. Also, all the four inputs in the row of sheet 2 have to match with with the four inputs in matched row of sheet1.

    If everything matches i have to get the result in the col 5 of sheet 2 as matched. even if any one of the 4 input is not matching, the result should be not matched. Can anyone tell your suggestion plz????
    Last edited by deviaug28; 12-09-2009 at 03:14 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: how to compare morethan one cell in macro

    Use a "helper column" that concatenates the cells for each row. Then compare the helper colmn for matches - AutoFilter or Advancedfilter should d it
    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
    12-02-2009
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: how to compare morethan one cell in macro

    Sure roy!!!!

+ 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