+ Reply to Thread
Results 1 to 7 of 7

If a cell is blank/empty return a value or perform a calculation

  1. #1
    Registered User
    Join Date
    05-07-2013
    Location
    Middlesex, England
    MS-Off Ver
    Excel 2013
    Posts
    3

    If a cell is blank/empty return a value or perform a calculation

    Hi there,

    I have two cells, B7 and C7, they are date formatted.

    If both B7 and C7 are blank I need to return 0 (zero)

    If, however, B7 has a value, but C7 is blank, I need to insert a value of .5

    If both B7 and C7 have values I need to perfom the calculation "=NETWORKDAYS(B7,C7,Summary_page!$B$4:$B$11)"

    I know I can use "=IF(ISBLANK" to return 0 (zero) when both B7 and C7 are empty, but from there I'm not sure what to do next.

    I must admit this has me a bit flummoxed anyone have any ideas or can point me in the right direction?

    Thanks very much.

    Kind regards,

    Mel

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: If a cell is blank/empty return a value or perfom a calculation

    you can try this one (untested)

    =if(and(b7<>0,c7<>0),NETWORKDAYS(B7,C7,Summary_page!$B$4:$B$11),if(c7="",0.5,0))
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: If a cell is blank/empty return a value or perfom a calculation

    Maybe this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,735

    Re: If a cell is blank/empty return a value or perfom a calculation

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Note the condition with a "??" result. This is when B7 is blank but C7 has a value. You did not cover that case in your explanation. Replace "??" with what result you want in that case.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  5. #5
    Registered User
    Join Date
    05-07-2013
    Location
    Middlesex, England
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: If a cell is blank/empty return a value or perfom a calculation

    Thanks very much for the quick response.

    The formula works a treat!

    I had to make a slight amendment - you had a typo using 5 where 0.5 was the required value.

    Otherwise a much more succinct formula than what I was originally attempting to try and get working.

  6. #6
    Registered User
    Join Date
    05-07-2013
    Location
    Middlesex, England
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: If a cell is blank/empty return a value or perfom a calculation

    Thanks very much for the quick response.

    The formula works a treat!

    I had to make a slight amendment - you had a typo, using 5 where 0.5 was the required value, but otherwise a much more succinct formula than what I was originally attempting to try and get working.

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: If a cell is blank/empty return a value or perform a calculation

    You're welcome. We appreciate the feedback!

    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

    It'd also be appreciated if you were to click the add Reputation button at the foot of any of the posts of those who helped you reach a solution.

+ 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. [SOLVED] IF FUNCTION Help - IF Cell= X Then Perform This Calculation, Otherwise Return Value of 0
    By JONBOY666 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-30-2015, 07:21 AM
  2. [SOLVED] help! Date formula to Return blank if cell is empty
    By marquint in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-08-2014, 01:32 AM
  3. Date formula to Return blank if cell is empty
    By Ctaxes in forum Excel - New Users/Basics
    Replies: 9
    Last Post: 01-07-2014, 11:28 PM
  4. Replies: 1
    Last Post: 02-12-2013, 06:02 PM
  5. Replies: 6
    Last Post: 03-21-2009, 11:43 AM
  6. If statement to return blank if cell D1 is empty...
    By bendixboogie in forum Excel General
    Replies: 8
    Last Post: 11-11-2008, 05:00 PM
  7. Return an empty or blank cell value?
    By Troymello in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-03-2006, 01:45 PM

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