+ Reply to Thread
Results 1 to 7 of 7

If cell blank OR another cell blank then show blank, if not display value

  1. #1
    Registered User
    Join Date
    04-09-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    36

    If cell blank OR another cell blank then show blank, if not display value

    Hi I am working on an excel sheet and have run into a problem.

    I wish to display the value of cell D13 if D13 OR A13 are not blank. So if neither of these cells are blank then the cell should display the value of D13, if not, it should show blank.

    I wish to count the "non blank" cells after that.

    Please help.

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: If cell blank OR another cell blank then show blank, if not display value

    You contradicted yourself slightly there so it's a little unclear whether you want Or/AND

    This will show the value of d13 if either a13 or d13 have values
    =IF(OR(A113<>"",D113<>""),D13,"")

    This will only show a value if both A13 and D13 have values
    =IF(AND(A113<>"",D113<>""),D13,"")
    Elegant Simplicity............. Not Always

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: If cell blank OR another cell blank then show blank, if not display value

    hi stevop622, welcome to the forum. like Andy mentioned, i think you meant if D13 AND A13 are not blank? if you don't mean that, what happens when only A13 is filled? or if only D13 is filled? if you meant it as "and", then:
    =IF(AND(A13<>"",D13<>""),D13,"")

    are you copying the formula downwards & want to count how many non-blank? not sure what you counting. and is D13 a text, number or either? for text:
    =COUNTIF(E13:E20,">""")
    for number:
    =COUNT(E13:E20)
    for both:
    =ROWS(E13:E20)-COUNTBLANK(E13:E20)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    04-09-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: If cell blank OR another cell blank then show blank, if not display value

    Thanks, I used the second option which works. I have the set up the cell next door to display a 0 if the cell displays a value (in this case D13) and then count all the zeros to give me the total number of lines in which both cells have values.

    Is there a way of instead of just showing the cell next door to be blank, but also to bring all the zeros to the top of the column? for example out of 100 lines, 8 meet the criteria of having both the A and D cells having values, but i want those 8 cells to all appear together and not have several blanks between them.

  5. #5
    Registered User
    Join Date
    04-09-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: If cell blank OR another cell blank then show blank, if not display value

    The value displayed will be text and not a number

  6. #6
    Registered User
    Join Date
    04-09-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: If cell blank OR another cell blank then show blank, if not display value

    If you use =round(a1,4) in cell A1 and similarly in Cell A2, iam sure u will not get the value in Cell A3 as 0.179999999 etc.,,
    Pls try using formula =Round

  7. #7
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: If cell blank OR another cell blank then show blank, if not display value

    Quote Originally Posted by stevop622 View Post
    Thanks, I used the second option which works. I have the set up the cell next door to display a 0 if the cell displays a value (in this case D13) and then count all the zeros to give me the total number of lines in which both cells have values.

    Is there a way of instead of just showing the cell next door to be blank, but also to bring all the zeros to the top of the column? for example out of 100 lines, 8 meet the criteria of having both the A and D cells having values, but i want those 8 cells to all appear together and not have several blanks between them.
    You can sort the data based on the column with the zero's..

+ 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