+ Reply to Thread
Results 1 to 21 of 21

formula to leave the cell blank

Hybrid View

  1. #1
    Registered User
    Join Date
    06-22-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    18

    Question formula to leave the cell blank

    Hi,
    This might be a simple question. How do I leave a cell blank (really blank so that ISBLANK() returns true) not with empty space "".
    For ex: formula in B1, =if(isblank(A1),blank B1, "notblank")

    Thanks,
    Bhuvana

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: formula to leave the cell blank

    If a cell contains a formula blank "" then =ISBLANK(cell_ref) = FALSE.

    It's better to use:

    =IF(cell_ref="",...

    Or:

    =IF(cell_ref<>"",...
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    06-22-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    18

    Re: formula to leave the cell blank

    Sorry,Tony. I quite did not get your answer. I want to blank a cell if source cell is blank. Like if A1 is blank then I want to make B1 blank. I used the following formula in B1,
    =IF(ISBLANK(A1),A1,"1") where A1 is blank. I except the value in B1 to be blank (so that =isblank(B1) = true) but the result of the formula is 0 not blank. And if I change my formula to be
    =IF(ISBLANK(I26)," ","1") then =isblank(B1) = false.

    thanks,
    Bhuvana

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: formula to leave the cell blank

    Not sure what you're wanting.

    Maybe this...

    =IF(A1="","",A1)

  5. #5
    Registered User
    Join Date
    06-22-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    18

    Re: formula to leave the cell blank

    Tony, setting the value to "" is not actually making the cell blank. after this formula, if you use =isblank(B1) then the result will be FALSE which means the cell is not blank. (where cell B1=IF(A1="","",A1)

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: formula to leave the cell blank

    Quote Originally Posted by bhuvanashriram View Post
    Tony, setting the value to "" is not actually making the cell blank. after this formula, if you use =isblank(B1) then the result will be FALSE which means the cell is not blank. (where cell B1=IF(A1="","",A1)
    I noted in my other reply that if a cell contains a formula blank that =ISBLANK(cell_ref) = FALSE.

    Not sure what you're trying to do.

    If a cell contains a formula that returns a formula blank "" then that cell is not EMPTY. It contains a formula that returns an empty TEXT string.

    That's the closest thing we can get to a "blank" cell using a formula.

    If you want an EMPTY cell then you'll have to use an event macro that deletes the cell formula.

    There's a difference between an EMPTY cell and a blank cell!

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: formula to leave the cell blank

    There's a difference between an EMPTY cell and a blank cell!
    Not helped by the fact that Excel's ISBLANK function tests for empty cell, not cells with null strings.
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: formula to leave the cell blank

    Quote Originally Posted by shg View Post
    There's a difference between an EMPTY cell and a blank cell!
    Not helped by the fact that Excel's ISBLANK function tests for empty cell, not cells with null strings.
    Exactly.

    I've commented on this before. Based on its characteristics, ISBLANK is misnamed. It should have been named ISEMPTY.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: formula to leave the cell blank

    Yes, Buvan, we know that.

    We are getting to the stage where we need to see a concrete example of what you have. I have attached a sheet.

    A1 contains a value
    B1 contains =IF(A1=2,4,"")
    C1 contains =IF(A1=2,4,"")

    is this the sort of thing you want. If not, please attach an Excel sheet that DOES show what you want.

    Make sure there is enough data to demonstrate your need. Make sure your desired results are shown, mock them up manually if necessary. Remember to remove ALL confidential information first!!!

    However, nothing on this Forum works quite as well as you might expect. The attachment icon doesn't work!! (Helpful, isn't it!!). Instead, just before you submit your post, click on GO ADVANCED (near the bottom) and then scroll down to Manage Attachments to open the upload window. The relevant instructions are at the top of that screen.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  10. #10
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: formula to leave the cell blank

    Without using VBA, you cannot have a formula in a cell return an empty cell. Either there is a formula in a cell, a value in a cell, or nothing.
    Last edited by 63falcondude; 09-19-2016 at 01:26 PM.

  11. #11
    Registered User
    Join Date
    06-22-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    18

    Re: formula to leave the cell blank

    I have attached the sample file to explain what I want. Hope that helps.
    Tony, yes you are getting my point now that there is a difference between blank and empty cell.
    In my workbook, cell A1 is blank so the formula in cell D1(=isblank(A1)) returns true. I want to bring the content of cell A1 to B1. (if A1 is blank B1 should also be blank not empty). So if isblank(A1) is true then isblank(B1) should also be true.The formula I used in cell B1 is =IF(ISBLANK(A1),"","not blank"). Now if you see the formula in C1 which is to check if B1 is blank then it returns false. That means, A1 is not the same as B1. A1 is blank but B1 is not.

    So I need a formula to copy contents of A1 to B1. If A1 is blank then B1 should also be blank so that isblank(A1) or isblank(B1) are true.

    Hope I have made clear!!

    Thanks,
    Bhuvana
    Attached Files Attached Files
    Last edited by bhuvanashriram; 09-20-2016 at 03:46 AM. Reason: added attachment

  12. #12
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: formula to leave the cell blank

    Quote Originally Posted by bhuvanashriram View Post
    So if isblank(A1) is true then isblank(B1) should also be true
    Hi,

    At the risk of merely repeating what everyone else here has already said, that is not possible if B1 contains a formula.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  13. #13
    Registered User
    Join Date
    06-22-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    18

    Re: formula to leave the cell blank

    ohhh!! now I get it!! Sorry Tony, I misunderstood your reply! and thanks xlnitwit! Although I am disappointed I cannot achieve this using formula now

    Cheers,
    Bhuvana

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: formula to leave the cell blank

    Exactly. So what we need to know is WHY you want ISBLANK() to show TRUE. What is the NEXT STEP? What is the information to be USED FOR. there will be a workaround.

  15. #15
    Registered User
    Join Date
    06-22-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    18

    Re: formula to leave the cell blank

    I can explain why I want, sorry that I do not have work around at this moment other than making it empty ("").
    I have two columns for cost of products, cost1 and cost2 which are the data pulled from SQL server.
    And I created third column for cost3 which has to be set to cost 2 if cost1 is blank/0.
    when we pull data from SQL database, if cost1 is NULL in database then excel shows that as blank.
    The formula on cost3 is =if(isblank(cost1),cost2,cost1). This formula returns 0 when cost2 is also blank. I wanted to eliminate that 0 and make the cost3 same as cost2.

    Example continued. Please check the formulas on C6 and C7,

    Thanks,
    Bhuvana
    Attached Files Attached Files

  16. #16
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: formula to leave the cell blank

    In C6, copied down:
    =IFERROR(1/(1/IF(A6="",B6,A6)),"")

  17. #17
    Registered User
    Join Date
    06-22-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    18

    Re: formula to leave the cell blank

    Glenn, I changed my formula to be =IF(ISBLANK(A7),IF(ISBLANK(B7),"",B7),A7), as the closest option is to make the cell "". In your formula, you are assigning value "" when there is error and the formula 1/0 will error out in my example.

    Bhuvana

  18. #18
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: formula to leave the cell blank

    Did you actually enter the formula that I suggested on your sheet. It returns EXACTLY what you aked for.

  19. #19
    Registered User
    Join Date
    06-22-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    18

    Re: formula to leave the cell blank

    Glenn, your formula returns "" and I understood what your formula does. But my objective for this thread is not to return "" but blank(actual blank cell). But I got to know that it is not possible where is formula on the cell even though it returns "". So the closest option is to return "" that can be done by many ways. One of the ways is your formula. I made it other way. Thanks for the suggestion! I did enter the formula you suggested and it makes the cell empty ("").

    Bhuvana

  20. #20
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: formula to leave the cell blank

    I still don't understand why you are insisting that it should be BLANK rather than EMPTY. What practical difference does it make? But, so long as you are happy....

  21. #21
    Registered User
    Join Date
    06-22-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    18

    Re: formula to leave the cell blank

    Glenn, practically I can work by comparing the cell value to "" and set the cell to "" in my formulas. But I do have other columns which again checks the value of cost3 if empty/blank. cost1,cost2 have the data pulled from sql server which is BLANK. But I cannot carry over the blank to other cells which has formulas on cost1/cost2. so ideally I can use isblank() on cost1/cost2 only. I am curious to use the same function on other cells (cos3) but I cannot.

+ 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. Replies: 1
    Last Post: 06-29-2016, 03:44 AM
  2. Formula needed to leave cell blank
    By jennijohnstone in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-17-2015, 07:41 AM
  3. Leave cell result blank if blank cell is in formula
    By Grind in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 09-28-2013, 06:15 AM
  4. If Then formula. If false, I would like to leave the cell blank.
    By joaquinwalking in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-30-2013, 01:56 PM
  5. Formula to leave a cell blank
    By dandavis1 in forum Excel General
    Replies: 6
    Last Post: 08-25-2009, 05:54 AM
  6. Question: How do I leave a cell blank if formula value is #N/A
    By Chobi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-20-2008, 04:08 PM
  7. [SOLVED] Formula <0 leave cell blank
    By Whit in forum Excel General
    Replies: 3
    Last Post: 08-12-2006, 09:50 PM

Tags for this Thread

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