+ Reply to Thread
Results 1 to 6 of 6

How to ignore blanks and get rid of error #value

  1. #1
    Registered User
    Join Date
    01-31-2018
    Location
    London
    MS-Off Ver
    2013
    Posts
    32

    How to ignore blanks and get rid of error #value

    Hello.

    I am trying to calculate the number of days between to dates, however not all cells have dates in.
    For those cells that are populated I am getting the correct answer by using the formula: =Cell - Cell. However if there is cell is not populated currently, I get an error of #value.
    What formula should I use to get rid of this error and return with no data, unless the dates are populated in the future?
    Thank you

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,627

    Re: How to ignore blanks and get rid of error #value

    How about this?

    =IFERROR(Cell - Cell,"")
    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
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: How to ignore blanks and get rid of error #value

    Something like this:

    =IFERROR((Cell - Cell),"")

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,959

    Re: How to ignore blanks and get rid of error #value

    2 options spring to mind...
    =if(cell="","",your-formula)
    or
    =iferror(your-formula,"")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,627

    Re: How to ignore blanks and get rid of error #value

    Paul - it won't do any harm, but the second set of brackets (braces) is unnecessary.

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,627

    Re: How to ignore blanks and get rid of error #value

    Thanks for the rep!

+ 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. ignore blanks
    By Patcheen in forum Excel General
    Replies: 7
    Last Post: 07-21-2017, 08:53 AM
  2. Ignore the blanks
    By ailismanzoni in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-19-2017, 08:41 AM
  3. VBA code finds blanks, but how to write VBA to ignore non blanks?
    By hopegriffin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-20-2016, 10:51 AM
  4. [SOLVED] Ignore Blanks in IF Statement
    By ShakJames in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-19-2016, 07:56 AM
  5. Ignore Blanks when using Randomize
    By How How in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2016, 02:40 PM
  6. [SOLVED] Lookup but ignore blanks
    By jayherring86 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-04-2015, 05:58 PM
  7. [SOLVED] MIN/MAX IF To Ignore Blanks
    By splendidus in forum Excel General
    Replies: 2
    Last Post: 07-04-2012, 04: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