+ Reply to Thread
Results 1 to 11 of 11

Formula for doing something when a cell has a formula but returns a blank.

  1. #1
    Registered User
    Join Date
    03-19-2010
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2010, 2007,2002
    Posts
    60

    Formula for doing something when a cell has a formula but returns a blank.

    I am looking for an If() formula that says that if a cell is blank then do this, otherwise that.

    The issue is that the "blank" cell has a formula in it. It is just returning nothing because I told it to, due to the fact that it did not meet some criteria.

    Isblank() formula does not work because the cell has a formula in it.

    How do I deal with this. Thanks
    Last edited by rmb623; 01-06-2011 at 01:05 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula for doing something when a cell has a formula but returns a blank.

    What are the 2 dependent formulas you have now?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    03-19-2010
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2010, 2007,2002
    Posts
    60

    Re: Formula for doing something when a cell has a formula but returns a blank.

    =IF(OR(ISNUMBER(SEARCH("@TRUE@TRUE",KEY!$B2)),ISNUMBER(SEARCH("@TRUE@FALSE",KEY!$B2)),ISNUMBER(SEARCH("@FALSE@TRUE",KEY!$B2))),LEFT(KEY!$B2,FIND("@",KEY!$B2)-1),"")

    This formula returns a "" for most of my cells, which is what I want.
    I am trying to build another formula that says if it is "blank" return "blank" otherwise return 'POSITION SERVER DROP'!B2

    =IF(ISBLANK(D2),"",'POSITION SERVER DROP'!B2)

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Formula for doing something when a cell has a formula but returns a blank.

    Hi rmb623,

    You are looking for the VBA property of .HasFormula. See:
    http://www.ozgrid.com/VBA/ExcelIsFormula.htm
    Looks like you need a UDF (User Defined Function)
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Registered User
    Join Date
    03-19-2010
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2010, 2007,2002
    Posts
    60

    Re: Formula for doing something when a cell has a formula but returns a blank.

    is there no way to avoid vba? surely there is

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula for doing something when a cell has a formula but returns a blank.

    Try:

    =IF(D2="","",'POSITION SERVER DROP'!B2)

  7. #7
    Registered User
    Join Date
    03-19-2010
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2010, 2007,2002
    Posts
    60

    Re: Formula for doing something when a cell has a formula but returns a blank.

    I already did. Does not work. It returns 'POSITION SERVER DROP'!B2 no matter what....i.e. for every cell i drag down on

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula for doing something when a cell has a formula but returns a blank.

    Any chances on attaching the workbook?

  9. #9
    Registered User
    Join Date
    03-19-2010
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2010, 2007,2002
    Posts
    60

    Re: Formula for doing something when a cell has a formula but returns a blank.

    That is not what I wanted. I will post a new one.
    Last edited by rmb623; 01-06-2011 at 12:57 PM.

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula for doing something when a cell has a formula but returns a blank.

    If I put:

    =IF(C1="","",'POSITION SERVER DROP'!B2)

    in your sample and copy down.. I get blanks as expected.

    I was hoping to see more about the other formula and what it is referencing to see if the formula is returning something else instead of what you think it is returning... say perhaps a space: " "...

  11. #11
    Registered User
    Join Date
    03-19-2010
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2010, 2007,2002
    Posts
    60

    Re: Formula for doing something when a cell has a formula but returns a blank.

    ID10T.


    =IF(D2="","",'POSITION SERVER DROP'!B2)

    works like a charm. thanks

+ 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