+ Reply to Thread
Results 1 to 6 of 6

Too many arguments

Hybrid View

  1. #1
    Registered User
    Join Date
    03-29-2007
    Posts
    33
    Hi

    Cut down C8
    Single door C12
    Double door C14
    Sidelite 1 C16
    Sidelite 2 C18
    Depending on the size of the door P5: P6 is full glass.
    What I need is this:
    IF C8 = TRUE AND C12 = TRUE THEN D8
    IF C8 = TRUE, C12 = TRUE, C16 = TRUE THEN D8*2
    IF C8 = TRUE, C12 = TRUE, C16 = TRUE, C18 = TRUE THEN D8*3
    IF C8 = TRUE, C14 = TRUE THEN D8*2
    IF C8 =TRUE, C14 = TRUE, C16 = TRUE, C18 = TRUE THEN D8*4
    Now if full glass is selected then:
    IF C8 = TRUE, IF(OR (P5=TRUE,P6=TRUE), C12 =TRUE THEN D8
    IF C8 = TRUE, IF(OR (P5=TRUE,P6=TRUE), C12 = TRUE, C16 =TRUE THEN D8
    IF C8 = TRUE, IF(OR (P5=TRUE,P6=TRUE), C12=TRUE, C16 = TRUE, C18 =TRUE THEN D8
    IF C8 = TRUE, IF(OR (P5=TRUE,P6=TRUE), C14 = TRUE THEN D8*2
    IF C8 = TRUE, IF(OR (P5=TRUE,P6=TRUE),C14 = TRUE, C16 = TRUE, C18 =TRUE THEN D8*2

  2. #2
    Forum Contributor
    Join Date
    10-27-2006
    Location
    United Kingdom
    MS-Off Ver
    EXCEL 2003 (2007 at home)
    Posts
    517

    Simplify

    I suggest that you split this down into (at least) 2 stages,
    one based on C8,C12,C14,C16 & C18 and the other on P5 & P6
    Perhaps you can assign an index to each of the posible combinations of C8,C12,C14,C16 & C18, thus :
    IF C8 = TRUE AND C12 = TRUE THEN 1
    IF C8 = TRUE, C12 = TRUE, C16 = TRUE THEN 2
    etc.
    this index can then be passed to different CHOOSE() functions based on the values of P5 & P6.

    Am I correct in thinking that when C12 is TRUE than C14 must be FALSE and visa versa? does this allow some simplification.
    All your list seems to have C8=TRUE, what happens if C8=FALSE
    Note that you dont have to use the IF(C12=TRUE,...,...) construction, if C12 is a logical value then you can just use IF(C12,...,...)

  3. #3
    Valued Forum Contributor
    Join Date
    07-11-2004
    Posts
    851
    you can string together many conditions like this

    =AND(C8=TRUE,C12=TRUE,C16=TRUE,C18=TRUE)*D8*3+AND(C8=TRUE,C12=TRUE,C16=TRUE,C18=FALSE)*D8*2+AND(C8=TRUE,C12=TRUE,C16=FALSE)*D8+AND(C8=TRUE,C12=FALSE,C14=TRUE,C16=TRUE,C18=TRUE)*D8*4+AND(C8=TRUE,C12=FALSE,C14=TRUE,C16=FALSE,C18=FALSE)*D8*2

    as long as your conditions are unique you won't add results.
    This eliminates the # of if statements from being a limit, you might run into the length of the formula being a limit though - but you could solve that by adding together 2 cells with only pieces of the formula in each
    not a professional, just trying to assist.....

+ 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