+ Reply to Thread
Results 1 to 16 of 16

Complicated and/or statment help required

  1. #1
    Registered User
    Join Date
    07-06-2010
    Location
    Beckenham
    MS-Off Ver
    Excel 2007
    Posts
    84

    Complicated and/or statment help required

    I have the following formula which works just fine however, I need to add another statement to it and am getting really stuck.

    Please Login or Register  to view this content.
    Effectively

    AT3 = Y means it's additional property
    Q3 = Y means in programme
    Q3 = A means added to programme
    Q3 = O means omitted from programme
    Q3 = AO means additional to programme but now omitted

    (Q3 is work type, I have 5 different, using cells Q to AH)

    What I need to add to the above so that it counts both and not one or the other is

    Q3 = A means added to programme
    AT3 = N Not an additional property

    Then, I need to know the actual number of properties in the additional programme across columns Q-AH but do not include Q3=A,AT3=N as this is additional work content for a property and not an additional property.

    I have attached a spreadsheet which will hopefully clarify a bit better as to what I need to do.

    The book contains 2 sheets, "Properties" and "calcs"

    On the "properties" sheet in column Q cell Q11=A However, this is not counted on the "calcs" sheets in column A as Cell AT11=N on the "properties" sheet, it needs to be included. However, should this scenario arise, I do not want to add it to the total number of properties in column H on the "calcs" sheet.

    Does that make sense?

    Any help would be much appreciated.
    Attached Files Attached Files
    Last edited by AllenMead; 10-10-2010 at 10:50 AM.

  2. #2
    Registered User
    Join Date
    07-06-2010
    Location
    Beckenham
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Adding an and/or statment.... I think.

    Resolved the last formula; as simple as;

    Please Login or Register  to view this content.
    Doh!

  3. #3
    Registered User
    Join Date
    07-06-2010
    Location
    Beckenham
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Adding an and/or statment.... I think.

    Have tried this, but I just get the word "FALSE" as the result.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    07-06-2010
    Location
    Beckenham
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Adding an and/or statment.... I think.

    Getting there, but getting rerally cheesed off, lol have re-jigged my formula, atleast I get a number returned, not the right one, but it's a number lol, should be a 1

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-06-2010
    Location
    Beckenham
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Adding an and/or statment.... I think.

    Got it!, I Think...
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    07-06-2010
    Location
    Beckenham
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Adding an and/or statment.... I think.

    I need to alter the following to take into account the above like so but am having trouble doing it.

    Please Login or Register  to view this content.
    Really stuck on that one really need help!

  7. #7
    Registered User
    Join Date
    07-06-2010
    Location
    Beckenham
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Adding an and/or statment.... I think.

    Quote Originally Posted by AllenMead View Post
    I need to alter the following to take into account the above like so but am having trouble doing it.

    Please Login or Register  to view this content.
    Really stuck on that one really need help!
    Tried this, but it's not quite right
    Please Login or Register  to view this content.
    Last edited by AllenMead; 10-05-2010 at 07:51 AM.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Complicated and/or statment help required

    Perhaps:

    Please Login or Register  to view this content.
    but what is this part supposed to fetch: Properties!$Q3="*" (you can't use a wildcard here).
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  9. #9
    Registered User
    Join Date
    07-06-2010
    Location
    Beckenham
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Complicated and/or statment help required

    ah, that's because that cell contains an asterix which denotes that that work programme is being carried out by someone else

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Complicated and/or statment help required

    Okay, then it should work to evaluate if the cell contains an asterisk.

    Does the formula work then?

  11. #11
    Registered User
    Join Date
    07-06-2010
    Location
    Beckenham
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Complicated and/or statment help required

    Ok, your formula works nicely, but it's not the result that I need. I'll try and explain it better.

    This gives me all windows;

    =IF(AND(Properties!$AX3,OR(AND(Properties!$AT3="Y",OR(Properties!$U3={"Y","A","O","AO"})),AND(Properties!$AT3="N",Properties!$U3="A"))),1,0)

    What I need to do is only count windows against Decent Homes (Column Q) Which is what this gives me;

    =IF(AND(OR(Properties!$Q3="Y",Properties!$Q3"O",Properties!$Q3="AO",Properties!$Q3="A",Properties!$Q3="*"),OR(Properties!$U3="Y",Properties!$U3="O",Properties!$U3="A",Properties!$U3="AO"),Properties!$AT3="Y"),1,0)

    But, I need to add this bit to the last 'OR' statement above

    AND(Properties!$AT3="N",Properties!$U3="A")))

    Essentially if the window is not an additional property (AT) but it's additional work and it's against a decent home (Q) count it.

    Does that make sense?

    I would upload the book but it's knocking on the door of 16mb

  12. #12
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Complicated and/or statment help required

    You can zip it... and then explain in words what exactly you want the formula to check. You have many AND's OR's and some that you probably don't need...

  13. #13
    Registered User
    Join Date
    07-06-2010
    Location
    Beckenham
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Complicated and/or statment help required

    Ok, have done a really cut down version.

    Essentially column D on the "Calcs" sheet is where the formula is and is counting the number of windows if it is an additional property and, it is a decent home.

    I need it to do the above, but also count if decent homes is additional (Column Q=A) it is a window but is not an additional property.
    Attached Files Attached Files
    Last edited by AllenMead; 10-05-2010 at 09:17 AM.

  14. #14
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Complicated and/or statment help required

    Quote Originally Posted by AllenMead View Post

    What I need to do is only count windows against Decent Homes (Column Q) Which is what this gives me;

    =IF(AND(OR(Properties!$Q3="Y",Properties!$Q3"O",Properties!$Q3="AO",Properties!$Q3="A",Properties!$Q3="*"),OR(Properties!$U3="Y",Properties!$U3="O",Properties!$U3="A",Properties!$U3="AO"),Properties!$AT3="Y"),1,0)

    But, I need to add this bit to the last 'OR' statement above

    AND(Properties!$AT3="N",Properties!$U3="A")))

    Essentially if the window is not an additional property (AT) but it's additional work and it's against a decent home (Q) count it.

    Does that make sense?

    I would upload the book but it's knocking on the door of 16mb
    Maybe it's this?:

    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    07-06-2010
    Location
    Beckenham
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Complicated and/or statment help required

    Hi NBVC Apologies for taking so long to get back on this one. I'll try and explain what I need like so,

    IF Q3 = (Y,A,AO,O,* and U3 = Y,A,AO,O and AT3 = Y) then count and,
    IF Q3 = (A,AO and U3 = Y,A,AO,O and AT3=N) then count

    Therefore in the example uploaded, Cell EF11 on the properties tab should also equal 1.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    07-06-2010
    Location
    Beckenham
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Complicated and/or statment help required

    Got it! I think, well, it seems to work

    Please Login or Register  to view this content.

+ 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