Conditional Function Within Access Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DyingIsis
    New Member
    • Aug 2007
    • 2

    Conditional Function Within Access Help

    Hello -

    I'm a relatively new user of Access.

    None the less, I have a function within Excel that I would like to recreate in Access.

    The function called (Check if part of a cell matches specific text) in Excel is below:
    =IF(ISNUMBER(SE ARCH("v",A2))," OK", "Not OK")

    I have been trying to replicate it in Access with little luck.

    Any help would greatly be appreciated, thanks.
  • Ares6881
    New Member
    • Jul 2007
    • 20

    #2
    Originally posted by DyingIsis
    Hello -

    I'm a relatively new user of Access.

    None the less, I have a function within Excel that I would like to recreate in Access.

    The function called (Check if part of a cell matches specific text) in Excel is below:
    =IF(ISNUMBER(SE ARCH("v",A2))," OK", "Not OK")

    I have been trying to replicate it in Access with little luck.

    Any help would greatly be appreciated, thanks.

    I think this might work for you

    Code:
    iif(like "*v*", "OK", "Not OK")
    It checks to see if the data has a v in it, if it does it says OK, if not it says Not OK.

    Comment

    • DyingIsis
      New Member
      • Aug 2007
      • 2

      #3
      Hello -

      Super thanks for the quick response.

      I know that in Excel I need to put in a reference cell, how do I do that in Access?

      I want it to look within a certain field within a certain table and if it sees something that contains "v", then return "OK, if not then return "Not OK".

      Thanks again.

      Comment

      • mlcampeau
        Recognized Expert Contributor
        • Jul 2007
        • 296

        #4
        Originally posted by DyingIsis
        Hello -

        Super thanks for the quick response.

        I know that in Excel I need to put in a reference cell, how do I do that in Access?

        I want it to look within a certain field within a certain table and if it sees something that contains "v", then return "OK, if not then return "Not OK".

        Thanks again.
        Create a query and select the field that you are wanting to check.
        [CODE=sql]SELECT iif([Field1] like "*v*", "OK", "Not OK") AS chkForV
        FROM Table1;[/CODE]
        Replace [Field1] and Table1 with your field and table names and you can use any Alias (doesn't have to be chkForV)

        Comment

        • Ares6881
          New Member
          • Jul 2007
          • 20

          #5
          Originally posted by mlcampeau
          Create a query and select the field that you are wanting to check.
          [CODE=sql]SELECT iif([Field1] like "*v*", "OK", "Not OK") AS chkForV
          FROM Table1;[/CODE]
          Replace [Field1] and Table1 with your field and table names and you can use any Alias (doesn't have to be chkForV)
          That would work, though he is new to access, and it wouldn't show any other fields they may want. Just put
          chkForV: iif([Field1] like "*v*", "OK", "Not OK")
          as one of your columns in a new query of your table, then put whatever information you want in the other columns. Again, like mlcampeau said
          Originally posted by mlcampeau
          Replace [Field1] and Table1 with your field and table names and you can use any Alias (doesn't have to be chkForV)

          Comment

          Working...