Consulting

Results 1 to 7 of 7

Thread: Array Formula

  1. #1

    Array Formula

    Afternoon,

    I'm using the below formula to count the number of enquires based on the criteria set in the array formula, however it doesn't seem to bring back the correct amount of enquires when i check manually, can anyone point out if there is something wrong with the formula:

    =SUM(IF(Status!$J$2:$J$65536="QCKCT",1,0)*IF(Status!$M$2:$M$65536<>"MULSC",1,0)*IF(Status!$F$2:$F$65536="DX",1,0)*IF(Status!$C$2:$C$65536<>"DWS Standard.Bundle",1,0)*IF(Status!$O$2:$O$65536<>"Capita Symonds Limited ZWET",1,0)*IF(Status!$O$2:$O$65536<>"Capita Symonds Ltd incorporating MMB Associates",1,0)*IF(Status!$R$2:$R$65536<>"Severn Trent",1,0)*IF(Status!$R$2:$R$65536<>"Anglian",1,0)*IF(Status!$R$2:$R$65536<>"Southern",1,0)*IF(Status!$R$2:$R$65536<>"Wessex",1,0)*IF(Status!$B$2:$B$65536='Formula Sheet'!J$3,1,0))

  2. #2
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    If you are using any excel prior to 2007 you are limited to 7 nested if's
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  3. #3
    Thanks for the info. I have reduced the number of nested IF statements in the formula and it works.

    My next question is can IF statements have 'OR' incorporated into the formula? An example of what I'm trying to do as per below:

    *IF(Status!$R$2:$R$65536<>("Severn Trent")+("Anglian")+("Southern")+("Wessex"),1,0)

    Any help would be great!

  4. #4
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    Yes, its available in excel help, you can construct it like this (assuming + doesn't mean AND!)
    =IF(OR(.......
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Try

    =SUMPRODUCT(--(Status!$R$2:$R$65<>"Severn Trent"),--(Status!$R$2:$R$65<>"Anglian"),--(Status!$R$2:$R$65<>"Southern"),--(Status!$R$2:$R$65<>"Wessex"))
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  6. #6
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    Quote Originally Posted by xld
    Try

    =SUMPRODUCT(--(Status!$R$2:$R$65<>"Severn Trent"),--(Status!$R$2:$R$65<>"Anglian"),--(Status!$R$2:$R$65<>"Southern"),--(Status!$R$2:$R$65<>"Wessex"))
    True to form Bob have you worked out how to get SUMPRODUCT to make tea yet?
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I am sipping a cup made by my good friend SP at this very moment.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •