+ Reply to Thread
Results 1 to 4 of 4

If statements with different input cells and more than two outcomes - If ? Or?

  1. #1
    Registered User
    Join Date
    01-03-2013
    Location
    Bracknell, England
    MS-Off Ver
    Excel 2013, Excel 2003
    Posts
    8

    If statements with different input cells and more than two outcomes - If ? Or?

    What I want to do is in the attached Excel worksheet. i provide data to a call centre. The data is exported from our asset management system.

    The data fields output from the asset management system are \
    Pno, Project and ProjectType. I use formulae to populate the subsequent fields.

    All projects which are specific types. CCTV is usually allocated to a specific subcontractor P&D. One project is not a CCTV project but needs to be handled similarly - p2043j. It was easy when this project was to be allocated to the P&D rota, I just used a formulae with an OR to make it a ProjectNote CCTV type.

    Now P4043J it has to be handled by another subcontractor and another project P2186C has also to be handled by a different subcontractor.

    So I want to set up a formula to set conditions based on specific project numbers (Pno) and Project Types to output the correct result to the Project Note.

    Do I use IFs nested or is there another way I can do this?


    I attach the data. It's my first time on this forum so excuse me if I am not supplying enough information.
    Attached Files Attached Files

  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
    44,425

    Re: If statements with different input cells and more than two outcomes - If ? Or?

    If you set up a little lookup table somewhere on the sheet, or on another sheet (ideally), you can use VLOOKUP to get the necessary details. This is probably more scaleable than Nested IFs with ANDs and ORs.

    For example, I1 to K3:

    HTML Code: 

    Then D2: =IFERROR(VLOOKUP($A2,$I$2:$K$3,2,FALSE),IF($C2="CCTV",$C2,"normal"))
    And E2: =IFERROR(VLOOKUP($A2,$I$2:$K$3,3,FALSE),IF($C2="CCTV","P and D Rota","Email only"))

    copy both formulae down.


    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
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: If statements with different input cells and more than two outcomes - If ? Or?

    3 IFs for Project note:
    Please Login or Register  to view this content.
    2 IFs for Outofhourscall:
    Please Login or Register  to view this content.
    Hope this help!
    Quang PT

  4. #4
    Registered User
    Join Date
    01-03-2013
    Location
    Bracknell, England
    MS-Off Ver
    Excel 2013, Excel 2003
    Posts
    8

    Re: If statements with different input cells and more than two outcomes - If ? Or?

    This is great, Quang! I only have one other formula to sort out. This is the last column for out of hours cover. Basically if ProjectNote CONTAINS the string "CCTV" then out of hours cover should be YES.

+ 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