+ Reply to Thread
Results 1 to 4 of 4

Is there a way to return either a number or a blank cell?

  1. #1
    Registered User
    Join Date
    06-19-2017
    Location
    Texas
    MS-Off Ver
    2013
    Posts
    33

    Is there a way to return either a number or a blank cell?

    Right now I have a simple function

    Please Login or Register  to view this content.
    This obviously returns a number. However, I dragged this formula down a spreadsheet where a user has to enter data in columns A and B. If there is no data in column B, the cell returns an error (dividing by zero). I worked around this somewhat by using the following function

    Please Login or Register  to view this content.
    This would return a zero if there is no data entered in column B. This is better, but not perfect. What I really want is a function that will either return the correct number or a blank cell. Is there a way to do this without using VBA?

  2. #2
    Forum Contributor
    Join Date
    01-05-2017
    Location
    New York
    MS-Off Ver
    Office 2016
    Posts
    206

    Re: Is there a way to return either a number or a blank cell?

    =iferror(a1/b1, "")

  3. #3
    Registered User
    Join Date
    01-19-2017
    Location
    Michigan
    MS-Off Ver
    2013
    Posts
    92

    Re: Is there a way to return either a number or a blank cell?

    If I understand correctly, you want it to return a blank cell and NOT a 0 (zero), if that's the case just replace the 0 with "" like so:

    =IFERROR(A1/B1,"")
    Last edited by Xandler; 06-21-2017 at 01:09 PM.

  4. #4
    Registered User
    Join Date
    06-19-2017
    Location
    Texas
    MS-Off Ver
    2013
    Posts
    33

    Re: Is there a way to return either a number or a blank cell?

    Thanks guys, simple enough

+ 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. Return first non blank cell (cells have formulas that return blank)
    By BG1983 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-05-2016, 04:06 PM
  2. Replies: 7
    Last Post: 12-06-2015, 05:40 PM
  3. [SOLVED] multiple if and vlookups, return number or blank cell
    By Christopherdj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-21-2014, 01:29 AM
  4. [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
  5. [SOLVED] Return row number of blank row
    By straubj in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-30-2013, 02:13 AM
  6. Replies: 5
    Last Post: 03-12-2010, 07:33 PM
  7. Return number from no blank cell
    By Wskip49 in forum Excel General
    Replies: 4
    Last Post: 08-05-2009, 11:19 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