+ Reply to Thread
Results 1 to 7 of 7

formula to ignore NA data OR how to make the formula result in a blank rather than NA

  1. #1
    Registered User
    Join Date
    01-04-2017
    Location
    Sheffield
    MS-Off Ver
    2010
    Posts
    42

    formula to ignore NA data OR how to make the formula result in a blank rather than NA

    Help please:

    I have some data about discharge dates and I then get the average of these the trouble is I sometimes don't have the discharge dates so this results in an #NA - which is fine as I know that it's because I don't have the data however the problem is when I sum all of those dates to get an average and this results in #NA as there are #NA's in that column....

    do I need to put something in the formula of the average sum to ignore the #NAs

    Or

    do I need to put something in the formula which is working out how long the patient has been in to say result in a blank if there is no discharge date then the average sum formula would be happy again?????

    Thanks

  2. #2
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: formula to ignore NA data OR how to make the formula result in a blank rather than NA

    To use data for further calculation you definatelly need to change formula that returns #N/A. You can return 0 or return nothing (blank cell).
    But you should take into account that all 0 will affect average result. To skip rows without discharge dates - you should keep cell blank.
    I don't know that formula do you use - lets call it "formula". Try to amend it like this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-04-2017
    Location
    Sheffield
    MS-Off Ver
    2010
    Posts
    42

    Re: formula to ignore NA data OR how to make the formula result in a blank rather than NA

    Start Date / Expected Discharge Date / Length of stay to date / Anticipated LOS


    Theses are my four title - I often don't have an expected discharge date so that column is empty so I would like in that case the anticipated LOS column to result in a blank cell

    I tried your formula - see below

    =if(ISNA(DATEDIF(E9,F9,"D")),"",DATEDIF(E9,F9,"D"))

    But instead of a blank cell is gave me a number

    26/10/2016 BLANK 70 83

    I don't understand why it resulted in 83?

  4. #4
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: formula to ignore NA data OR how to make the formula result in a blank rather than NA

    Ok, lets make it simple. Expected Discharge Date is column B, right? If not, then change B9 to the right column reference.
    So formula could be:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-04-2017
    Location
    Sheffield
    MS-Off Ver
    2010
    Posts
    42

    Re: formula to ignore NA data OR how to make the formula result in a blank rather than NA

    E = Start Date

    F = expected discharge date

    G = Length of Stay

    H = Anticipated LOS

    I would like H to result in a blank if F is blank

  6. #6
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: formula to ignore NA data OR how to make the formula result in a blank rather than NA

    Cell H9 formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-04-2017
    Location
    Sheffield
    MS-Off Ver
    2010
    Posts
    42

    Re: formula to ignore NA data OR how to make the formula result in a blank rather than NA

    yes that worked - thanks
    Have hit an error when there was some writing in the cell but think will just have to deal with those couple on individual basis

    thanks for the 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. [SOLVED] Need Help creating formula to rid a data set of blank rows based of 2 result columns
    By Isara1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-21-2016, 11:16 AM
  2. [SOLVED] Ignore blank cells with formulas or ignore NA() in a formula
    By guiismiti in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 03-24-2016, 02:13 PM
  3. [SOLVED] Formula to ignore blank cells and copy data that meets criteria?
    By Office_Dummy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-27-2014, 12:29 PM
  4. Replies: 2
    Last Post: 10-18-2013, 11:18 AM
  5. [SOLVED] using a max formula on a column with no data to give a Blank result
    By Brentsa in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-02-2013, 05:42 AM
  6. Replies: 4
    Last Post: 05-22-2009, 11:17 AM
  7. [SOLVED] how to make a formula ignore blank cells
    By Snap in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-07-2006, 08:00 PM

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