+ Reply to Thread
Results 1 to 3 of 3

Conditional statement

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

    Conditional statement

    Hi there

    I have an set of conditional statements to check which i'm not sure whether to use IF or CASE statement. can u please advice

    Find below the code

    Please Login or Register  to view this content.
    I'm passing strcode to another function which generates email so
    Please Login or Register  to view this content.
    But for some reason the right condition is not getting picked up
    Last edited by captedgar; 01-28-2010 at 08:07 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Conditional statement

    Hi

    Without knowing which condition is being picked up and which condition you think should be picked up it's difficult to advise. Don't worry at the moment about the difference between If..Then and Select Case structures, the first thing to reconcile is the basic problem.
    Can you upload an example workbook so that we can see the problem in context. If you do add a note saying what you expect should be happening.

    Regards
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

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

    Re: Conditional statement

    Hi there

    I have attached a simple spreadsheet with a table in it
    All the cells except the headers in the tables are conditional formatted so that
    if i select a cell in the table as No, the colour of the cell turns red
    if i select Yes, the cell color turns green and
    if i select NA, the cell color turns orange.

    My code is below

    Please Login or Register  to view this content.
    When i need to select a particular row as Yes or NA, my IF statement is breaking logic in
    picking the right strcode value independent of whatever the values are in the other cells in
    the table

    Please advice
    Attached Files Attached Files

+ 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