+ Reply to Thread
Results 1 to 9 of 9

Formula needs to check if it equates to zero and return a blank cell

  1. #1
    Forum Contributor
    Join Date
    04-02-2010
    Location
    penrith
    MS-Off Ver
    Excel 2007
    Posts
    522

    Formula needs to check if it equates to zero and return a blank cell

    Hi I have a formula (see below) that looks at a clolumn of information an returns a value if one is present if not then the cell needs to remain blank, currently the formula returns a 0 if blank, is there any way of stopping this or just by implementing a If(Formula=0,"") situation.

    =IFERROR(IF($C212="","",INDEX('Course Data Entry'!$X$17:$X$538,MATCH(1,INDEX(('Course Data Entry'!$Z$17:$Z$538=$E212)*('Course Data Entry'!$AF$17:$AF$538=$C212),0),0))),"")


    Thanks in advance

    JD

  2. #2
    Forum Contributor
    Join Date
    01-30-2013
    Location
    Wales
    MS-Off Ver
    Excel 2013
    Posts
    231

    Re: Formula needs to check if it equates to zero and return a blank cell

    There are 2 zero's near the end of your formula, replace these with double quotes "".
    Click * below if this answer helped

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

    Re: Formula needs to check if it equates to zero and return a blank cell

    Hi John,

    what kind of values do they return? I can see they are numbers, but are they integers, or can they be fractional?

    You can hide zeros by using a custom format on the cells like this:

    General;General;;

    but if you specifically want, say, 2 decimal places shown you need to use:

    0.00:-0.00;;

    Hope this helps.

    Pete

  4. #4
    Forum Contributor
    Join Date
    04-02-2010
    Location
    penrith
    MS-Off Ver
    Excel 2007
    Posts
    522

    Re: Formula needs to check if it equates to zero and return a blank cell

    If I do that it actually gets rid of the result wether its a 0 or not.

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

    Re: Formula needs to check if it equates to zero and return a blank cell

    Quote Originally Posted by Chris 53 View Post
    There are 2 zero's near the end of your formula, replace these with double quotes "".
    No, those zeros are needed for the two INDEX functions - a zero is returned by the formula if the cell that it identifies is either blank or contains a zero itself.

    Pete

  6. #6
    Forum Contributor
    Join Date
    04-02-2010
    Location
    penrith
    MS-Off Ver
    Excel 2007
    Posts
    522

    Re: Formula needs to check if it equates to zero and return a blank cell

    There three types of this formula, one returns a date, the second returns a time and the third returns a day.

    The date just shows up as 01/00/1900 (a zero), the time shows up as 12:00 Am (Again a zero) and the day just defaults to Saturday.

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

    Re: Formula needs to check if it equates to zero and return a blank cell

    Okay, so they are all positive. You can use these custom formats as appropriate:

    dd/mm/yyyy;;;

    hh:mm;;;

    dddd;;;

    The important thing is the semicolons after the format string. Custom Formats have 4 parts - one for positive, one for negative, one for zero values and the other for Text, and each is separated by a semicolon. By having nothing between those semicolons, this causes nothing to be displayed.

    So, click on a cell which has a date format, right-click and choose Format Cells, then on the Number tab you will have Date selected. Scroll down and select Custom, and the previous format will already be shown in the dialogue box. Just add three semicolons to the end, then click OK. Similar for the other data types.

    Hope this helps.

    Pete

  8. #8
    Forum Contributor
    Join Date
    04-02-2010
    Location
    penrith
    MS-Off Ver
    Excel 2007
    Posts
    522

    Re: Formula needs to check if it equates to zero and return a blank cell

    Pity i cant swear on here LOL coz that was a ******* great answer Pete, thanks for bailing me out again pal.

    Much appreciated.

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

    Re: Formula needs to check if it equates to zero and return a blank cell

    I wonder what those seven asterisks can be ???

    Glad to be able to help - you know what to do about marking the thread as Solved, and clicking the star etc.

    Pete

+ 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. Index/ Match Formula, How to return blank cell as a blank not 0
    By MDResearcher in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-24-2016, 08:40 PM
  2. [SOLVED] Cell referenced in formula has no information displayed (shows blank), return blank cell
    By nunayobinezz in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-07-2013, 04:51 PM
  3. If formula to return blank if reference cell blank
    By dhooper in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-10-2013, 08:56 PM
  4. [SOLVED] Need formula to return blank instead of #N/A when source cell is blank, using VLOOKUP
    By TMB1234 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-03-2013, 07:16 PM
  5. i am trying to use a formula that accepts equates words to a cost
    By Ma10mus in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-08-2006, 06:10 AM

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