+ Reply to Thread
Results 1 to 5 of 5

I have big issue in excel formula

  1. #1
    Registered User
    Join Date
    12-27-2016
    Location
    ksa
    MS-Off Ver
    excel
    Posts
    3

    Smile I have big issue in excel formula

    Good evening,



    I have big issue with excel. I want to calculate number of days "long stay patient" from admission date based on 3 criteria.



    1. if discharge patient not today, then calculate number of days " long stay patient" from admission till discharged date.



    2. if expired patient not today, then calculate number of days " long stay patient" from admission till expired date.



    3. if not discharge or expired, then calculate number of days " long stay patient" from admission till today.



    Please see excel sheet in attachment



    Thanks a lot
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: I have big issue in excel formula

    In Cell G4 try

    =IF(M4="",IF(L4="",TODAY(),L4),M4)-E4

    Copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: I have big issue in excel formula

    =if(max(l4,m4)=0,today(),max(l4,m4))-e4

  4. #4
    Registered User
    Join Date
    12-27-2016
    Location
    ksa
    MS-Off Ver
    excel
    Posts
    3

    Re: I have big issue in excel formula

    Thanks a lot Mr.Ace_XL , it work 100%
    Last edited by bandar2017; 01-24-2020 at 10:24 AM.

  5. #5
    Registered User
    Join Date
    12-27-2016
    Location
    ksa
    MS-Off Ver
    excel
    Posts
    3

    Re: I have big issue in excel formula

    Sorry Mr.davsth it not work.

    The correct formula from Mr.Ace_XL : =IF(M4="",IF(L4="",TODAY(),L4),M4)-E4
    Last edited by bandar2017; 01-24-2020 at 10:24 AM.

+ 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. Issue with IF formula in Excel
    By BMD4 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-15-2018, 02:20 AM
  2. Replies: 7
    Last Post: 12-15-2017, 12:14 AM
  3. Excel Formula Issue
    By chrisellis250 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-29-2016, 09:01 AM
  4. Excel Formula Issue
    By RichardLeeds in forum Excel General
    Replies: 2
    Last Post: 05-05-2015, 12:07 PM
  5. MS Excel Formula issue
    By tahirsatti in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-18-2014, 02:22 PM
  6. VBA/Excel formula issue
    By spinkung in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-22-2007, 08:01 AM
  7. Excel Formula Issue
    By [email protected] in forum Excel General
    Replies: 2
    Last Post: 08-16-2006, 06:50 PM

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