+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : in formula -return a blank cell if a reference cell is blank

  1. #1
    Registered User
    Join Date
    03-23-2011
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2007
    Posts
    8

    in formula -return a blank cell if a reference cell is blank

    I have very large spreadsheets with blank cells sprinkled here and there. Occasionally, a formula will refer to a blank cell and it returns the #NUM!, #DIV! or more importantly an actual number when one of the referenced cells is blank. Is there a box I can check in settings that will just give me a blank cell when a reference cell is empty? It would save me gagillions of hours and I would be eternally grateful if someone knows!
    Last edited by osteolass; 03-23-2011 at 07:09 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: in formula -return a blank cell if a reference cell is blank

    If you have a basic formula such as: =A1 in a cell, it will return 0 if cell A1 is blank.

    This can be avoided by using: =IF(A1="","",A1)

    or, by using: =A1&""

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    03-23-2011
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: in formula -return a blank cell if a reference cell is blank

    Thanks for your speedy reply! Unfortunately the formulas I'm using are not as simple. I tried to incorporate that solution into them to no avail...

    Might you be so kind as to help with a situation such as:
    =ln(B2/(C2*D2)
    where any (or multiple) cells might be blank?

  4. #4
    Registered User
    Join Date
    03-15-2011
    Location
    cluj napoca
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: in formula -return a blank cell if a reference cell is blank

    you could try this
    Please Login or Register  to view this content.
    Last edited by meslija; 03-23-2011 at 05:25 PM.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: in formula -return a blank cell if a reference cell is blank

    =IF(OR(B2="",C2="",D2=""),"",ln(B2/(C2*D2))


    Regards

  6. #6
    Registered User
    Join Date
    03-23-2011
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: in formula -return a blank cell if a reference cell is blank

    Hurrah! Thanks! You two are absolute gems. Many thanks and many hours not wasted because of the two of you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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