+ Reply to Thread
Results 1 to 3 of 3

IIF statement across several columns

  1. #1
    Registered User
    Join Date
    02-24-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    31

    Question IIF statement across several columns

    Hi all,

    I'm transferring an excel spreadsheet into an access database and i'm having a few issues with converting some of the formulae

    In my excel sheet i have a formulae that looks across a number of columns K to AP for the words "Non Compliant" and returns "Yes" if any contain it.

    =IF(ISNUMBER(MATCH("Non compliant",K8:AP8,0)),"Yes","Compliant")

    Now that each of these are individual columns in access i am trying to replicate this formula in an access query, and being fairly new to access syntax i am struggling. Columns K-AP are now labelled [Compliance 1], [Compliance 2] through to [Compliance 16]

    Initially i thought of going down the route:

    =Iif(([Compliance 1]="Non Compliant" OR [Compliance 2]="Non Compliant" OR [Compliance 3]="Non Compliant" OR [Compliance 4]="Non Compliant" OR [Compliance 5]="Non Compliant" OR [Compliance 6]="Non Compliant"),"Yes","Compliant")

    but this does not work,

    Anyone know how i can do this?

    Regards,

    Mike
    Last edited by Fursmanm; 01-30-2013 at 10:48 AM. Reason: Bad title

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: IIF statement help

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.


  3. #3
    Registered User
    Join Date
    02-24-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: IIF statement across several columns

    Didn't really know what to call the thread, i've changed it, hopefully it is (slightly) more appropriate.

    Apologies

+ 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