+ Reply to Thread
Results 1 to 4 of 4

IF, Then AND - problems with Syntax

  1. #1
    Registered User
    Join Date
    01-05-2012
    Location
    Salinas
    MS-Off Ver
    Excel 2007
    Posts
    22

    IF, Then AND - problems with Syntax

    Having some problems with Syntax. I have some experience with programming macros, but this doesn't seem to be working... what am I doing wrong? My goal is to compare 4 separate cell pairs in two different worksheets - if the 4 cell pairs are equivalent then one of the worksheets will be populated by another. Here is what I have. Any help would be greatly appreciated:

    Please Login or Register  to view this content.
    Last edited by Cutter; 09-21-2012 at 09:33 PM. Reason: Added code tags

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,487

    Re: IF, Then AND - problems with Syntax

    I would use:

    Please Login or Register  to view this content.

    Note that you should add code tags as I have.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    08-31-2012
    Location
    HCM City, VN
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: IF, Then AND - problems with Syntax

    You should remember that you have to use " _" when you seperate two lines from one. Two below codes are same.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Anyway, TMShucks helped you sloving your problem.
    Last edited by Cutter; 09-22-2012 at 10:36 AM. Reason: Removed whole post quote

  4. #4
    Registered User
    Join Date
    01-05-2012
    Location
    Salinas
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: IF, Then AND - problems with Syntax

    Thanks all for your help! Sorry for the delayed reply... been deep into programming.

+ 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