+ Reply to Thread
Results 1 to 10 of 10

Explain Syntax Error

  1. #1
    Registered User
    Join Date
    10-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    76

    Explain Syntax Error

    Please can you advice where i'm going wrong.

    my IF statement is breaking logic in picking the right strcode value.
    Can u please advice whats wrong with this syntax?

    I have also attached a worksheet to explain the problem

    My code is below

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by captedgar; 02-08-2010 at 09:14 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    re: Explain Syntax Error

    Hi captedgar
    whats the other part of the function?
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    10-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    76

    re: Explain Syntax Error

    Hi Pike
    Thanks for the reply

    The above is the part is passed to .subject variable in my function called SendEmail which send email when a cell value is changed. So overall the SendEmail function is working fine.
    I'm using Ron DeBruin method of sending email

    So when i'm selecting a Yes in the attached spreadsheet, the right strcode value is not getting inserted to the subject

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,015

    re: Explain Syntax Error

    X-post here, BTW.
    Everyone who confuses correlation and causation ends up dead.

  5. #5
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    re: Explain Syntax Error

    syntax is fine for the Yes and No bits
    but if three cells have Yes it will allways pick the first one
    other than that it depends on the other part of the AND

  6. #6
    Registered User
    Join Date
    10-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    76

    re: Explain Syntax Error

    Thanks for the reply Pike

    Is there any functionality in excel that i could use to make sure that if there are 3 Yes in the row and someone changes the G8 to No and then change G8 back to Yes, strcode will pull the value relevent to G8 only and not break the code

  7. #7
    Registered User
    Join Date
    10-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    76

    re: Explain Syntax Error

    Thanks Pike

    I figured out solution. I had to make the condition to execute a bit more strong to resolve this issue

  8. #8
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    re: Explain Syntax Error

    good stuff what were the changes?

  9. #9
    Registered User
    Join Date
    10-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    76

    re: Explain Syntax Error

    The following were the changes. Those higlighted text in red were the ones i have omitted
    Although the logic still doesn;t pick up correct strcode if certain rows are already set to Yes.
    But this is better than before

    Please Login or Register  to view this content.

    Quote Originally Posted by pike View Post
    good stuff what were the changes?

  10. #10
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    re: Explain Syntax Error

    Hi captedgar
    or something like this to change the value automatically

    Please Login or Register  to view this content.

+ 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