+ Reply to Thread
Results 1 to 7 of 7

Return blank cell if other cells empty, calculate percentage value if other cells filled

Hybrid View

Kerry1980 Return blank cell if other... 01-07-2022, 08:15 AM
AliGW Re: Return blank cell if... 01-07-2022, 08:27 AM
Kerry1980 Re: Return blank cell if... 01-07-2022, 08:32 AM
Kerry1980 Re: Return blank cell if... 01-07-2022, 08:45 AM
AliGW Re: Return blank cell if... 01-07-2022, 08:54 AM
Kerry1980 Re: Return blank cell if... 01-07-2022, 08:59 AM
AliGW Re: Return blank cell if... 01-07-2022, 09:25 AM
  1. #1
    Registered User
    Join Date
    10-25-2021
    Location
    UK
    MS-Off Ver
    365
    Posts
    30

    Return blank cell if other cells empty, calculate percentage value if other cells filled

    Hello and Happy New Year,

    I have a column (we'll call it column C) which is formatted to produce a percentage total based on values in two other columns i.e. =SUM(B5/A5). Occasionally, cells in column A and B are yet to be populated, and this results in the #DIV/0)! error in column C. What formula might I use to produce the % value in column C but also return a blank cell rather than an error if cells A and B are not yet populated? I've tried variations of =IF but I can't quite get it to work.

    Many thanks,

    Kerry

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,466

    Re: Return blank cell if other cells empty, calculate percentage value if other cells fill

    1. You do NOT need SUM!!!

    2. Try this:

    =IF(OR(A5="",B5=""),"",B5/A5)
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    10-25-2021
    Location
    UK
    MS-Off Ver
    365
    Posts
    30

    Re: Return blank cell if other cells empty, calculate percentage value if other cells fill

    That works perfectly, thank you.

    All these years and I never realised I could do the calcs without sum!!

  4. #4
    Registered User
    Join Date
    10-25-2021
    Location
    UK
    MS-Off Ver
    365
    Posts
    30

    Re: Return blank cell if other cells empty, calculate percentage value if other cells fill

    Apologies, I marked this thread as solved but I've just discovered something else.

    Occasionally, both column b and column A are populated with 0 values, and instead of returning 0 (as in 0/0 = 0) it returns the DIV error in column C. How might I change the formula you suggested above to accommodate this so that column C still returns a blank cell?

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,466

    Re: Return blank cell if other cells empty, calculate percentage value if other cells fill

    Anything divided by 0 will return a #DIV! error.

    See if this works for you:

    =IF(OR(A5="",B5=""),"",IFERROR(B5/A5,0))

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  6. #6
    Registered User
    Join Date
    10-25-2021
    Location
    UK
    MS-Off Ver
    365
    Posts
    30

    Re: Return blank cell if other cells empty, calculate percentage value if other cells fill

    Perfect, thank you!

    I've already added reputation but I'll do so again.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,466

    Re: Return blank cell if other cells empty, calculate percentage value if other cells fill

    Sorry - I hadn't seen that! Kind of you.

+ 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 All Empty and Blank String Cells
    By philchi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-21-2020, 02:02 AM
  2. [SOLVED] Copy and Paste only filled cells from a dynamic range to another sheet in empty cells
    By seanpcorbett1 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-12-2016, 03:23 PM
  3. Replies: 3
    Last Post: 07-30-2015, 10:33 PM
  4. Count filled and empty cells from the first filled cell in a row
    By mdaoust in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-01-2014, 01:23 PM
  5. Need to find empty filled cells in a column and copy to the empty cell below
    By Grahamfeeley in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-30-2014, 10:09 AM
  6. [SOLVED] Calculate only if one out of multiple blank cells are filled out
    By Platak in forum Excel - New Users/Basics
    Replies: 10
    Last Post: 11-25-2013, 01:40 AM
  7. How to keep an averaging cell empty until all the input cells are filled
    By troyer in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-29-2013, 11:02 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