+ Reply to Thread
Results 1 to 4 of 4

If with AND criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    03-08-2016
    Location
    LONDON, ENGLAND
    MS-Off Ver
    2011
    Posts
    18

    If with AND criteria

    I cannot get this to work =if(E3=E2),IF(AND(D3="Closed",D2="Opened",C3>C2),C3-C2,"")

    Cells E3 and E2 are txt strings, so
    if they are the same,
    then
    if Cell D3 contains string "Closed"
    and Cell D2 contains string "Open"
    and Time value in cell C3 is greater than Time value in C2
    Then elapsed time will be C3-C2
    Otherwise leave blank.

    Missing something but just stuck.

    Anyone advise?
    Last edited by MichaelTzu; 09-24-2019 at 10:25 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,426

    Re: Help with Function

    Try it like this:

    =IF(E3=E2,IF(AND(D3="Closed",D2="Opened",C3>C2),C3-C2,""),"")

    Should it be "Opened" or "Open" ??

    Hope this helps.

    Pete

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: If with AND criteria

    Rule 01: Thread Titles

    Hi. We'd like to help... but.

    Your thread title is VERY weak. It should resemble the terms you would use if you were searching Google for an answer. Your title would produce a squillion useless hits.

    But. You are a very infrequent visitor here, so I have changed your title for you, on this occasion. However, if you continue to use weak titles, you can expect your thread to be LOCKED until YOU make the required changes.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Registered User
    Join Date
    03-08-2016
    Location
    LONDON, ENGLAND
    MS-Off Ver
    2011
    Posts
    18

    Re: If with AND criteria

    Sorted. Text strings had trailing or leading spaces!! Spent hours on this but thank you for help.

+ 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. COUNTUNIQUE Function in Google Sheets; Excel lacks a direct counterpart to this function?
    By PivotTablePSHomage in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-18-2018, 05:27 AM
  2. [SOLVED] Usage of standard functions into custom function (or user defined function)
    By tusharb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-13-2016, 12:43 AM
  3. Calling function inside function. (aka nested function)
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2015, 05:58 AM
  4. Replies: 13
    Last Post: 04-08-2014, 05:46 AM
  5. Replies: 2
    Last Post: 01-15-2014, 11:40 PM
  6. [SOLVED] IF Function referencing IsNumber, Match, Left function on separate sheets
    By Touch9713 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-12-2013, 10:09 PM
  7. Replies: 1
    Last Post: 03-21-2012, 11:22 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