+ Reply to Thread
Results 1 to 5 of 5

Only perform formula if another cell is non-blank

  1. #1
    Registered User
    Join Date
    10-27-2011
    Location
    Wellingborough, England
    MS-Off Ver
    Excel 2011
    Posts
    13

    Only perform formula if another cell is non-blank

    Hi again everyone.

    Thanks to everyone for helping with my previous problem (here) but I've now got another problem with the same spreadsheet.

    I am trying to get an if formula to only return a value is a cell (that is the second part of the if) is non blank as well. I've tried with several permutations of IF's/AND's but cannot get it to work.

    =IF(C5="","",IF(J5="No",0.1,1)) < the formula currently in cell K5, but I also want it to stay blank if J5 (which is data validated to either be blank, Yes or No answers) is blank too. Theoretically I could add a further IF statement to the front but Excel won't do that many IF's in one go.

    Have given myself a small logic headache trying to solve this this morning!

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Only perform formula if another cell is non-blank

    This must works.

    =IF(or(C5="",j5=""),"",IF(J5="No",0.1,1)))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: Only perform formula if another cell is non-blank

    Try this: =If(or(C5="",J5=""),"",if(J5="no",0.1,1))

    Alan
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    10-27-2011
    Location
    Wellingborough, England
    MS-Off Ver
    Excel 2011
    Posts
    13

    Re: Only perform formula if another cell is non-blank

    Quote Originally Posted by Fotis1991 View Post
    This must works.

    =IF(or(C5="",j5=""),"",IF(J5="No",0.1,1)))
    Perfect, you made it look easy as well, thanks very much

    (will mark thread as solved)

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Only perform formula if another cell is non-blank

    You are welcome, but also Alan did the same suggestion.

+ 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