+ Reply to Thread
Results 1 to 8 of 8

IF(OR... not working

  1. #1
    Registered User
    Join Date
    06-14-2005
    Location
    London
    MS-Off Ver
    2016
    Posts
    91

    Unhappy IF(OR... not working

    So i have this if (or statement

    =IF(OR(TBLtask[state]="Open", TBLtask[state]="Pending", TBLtask[state]="Work in Progress", TBLtask[state]="Closed Complete"),COUNTIFS(TBLtask[opened_at], ">="&$E$4, TBLtask[opened_at], "<="&$G$4,TBLtask[Acora_Logged], "TRUE"),0)

    It works in that it doesn't error BUT it doesn't work in that it is not differentiating other states "Closed Incomplete" and is therefore including that in the final figure....whats wrong with my syntax?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: IF(OR... not working

    Explain in WORDS what you think that your formula is doing. It would be helpful to provide a workbook.

    The "TRUE" part of the COUNTIFS is definitely wrong, but until I know what you are expecting, I can't suggest an alternative.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    06-14-2005
    Location
    London
    MS-Off Ver
    2016
    Posts
    91

    Re: IF(OR... not working

    Thanks AliGW,

    The 'TRUE' part is a field in the table whereby it indicates as to whether the record was written by my team or not. So if it was written by the BangKok team this field will be FALSE in the table, i've now amended it to Yes or No, so the formulae is

    =IF(OR(TBLtask[state]="Open", TBLtask[state]="Pending", TBLtask[state]="Work in Progress", TBLtask[state]="Closed Complete"),COUNTIFS(TBLtask[opened_at], ">="&$E$4, TBLtask[opened_at], "<="&$G$4,TBLtask[Acora_Logged], "Yes"),0)

    I'm expecting it to get a single number which is the total count of all records that are in one of those states, logged between the dates and where Acora Logged was yes

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: IF(OR... not working

    Sorry - you aren't telling me what you are trying to do, only what you expect the result to be, and that's not enough for me.

    There are instructions at the top of the page explaining how to attach your sample workbook.

  5. #5
    Registered User
    Join Date
    06-14-2005
    Location
    London
    MS-Off Ver
    2016
    Posts
    91

    Re: IF(OR... not working

    Data example attached now, hopefully that makes it clearer?
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: IF(OR... not working

    Unfortunately, that doesn't fully help.

    What do E4 and G4 refer to in your original formula, because there is nothing in these cells in the sample.

    You still have not explained in WORDS what you want the formula to do. You have still only given us the results you want, and without an explanation, these mean very little.

  7. #7
    Registered User
    Join Date
    06-14-2005
    Location
    London
    MS-Off Ver
    2016
    Posts
    91

    Re: IF(OR... not working

    Ok so E4 and G4 are in date fields, in this example e4$=01/02/21 and G4$=28/02/21.

    So i want the formulae to check each line and if the state is equal to one of those, then i want to count the instances which are between the date range (e4 to g4) and where they were logged by that team

  8. #8
    Forum Contributor
    Join Date
    03-28-2021
    Location
    China
    MS-Off Ver
    O365
    Posts
    111

    Re: IF(OR... not working

    Formula: copy to clipboard
    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)

Similar Threads

  1. Replies: 1
    Last Post: 08-30-2017, 02:32 AM
  2. Format a part of a text working with only value not working with formula result
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2017, 05:41 AM
  3. Replies: 1
    Last Post: 02-27-2016, 06:28 PM
  4. Replies: 4
    Last Post: 09-03-2013, 02:52 AM
  5. Replies: 9
    Last Post: 03-08-2013, 11:50 AM
  6. Replies: 2
    Last Post: 08-17-2012, 08:16 AM
  7. Replies: 1
    Last Post: 01-26-2005, 04:20 AM

Tags for this Thread

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