+ Reply to Thread
Results 1 to 6 of 6

Skip empty cell in formula

  1. #1
    Registered User
    Join Date
    07-01-2014
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    12

    Skip empty cell in formula

    Hi there,

    Im trying to make a simple formula in excel but I can't get what I want. Maybe there is someone here that can give me some help.

    I want to make the formula: x=SUM(A * e^(-b*d)), wherein A and b are parameters and d the distance.

    I've just over 10.000 rows and 15 columns (B4 to P10013) with distances. For each column i give a formula =$S$2*EXP(-$R$2*B4) and extent that for all colums and rows, then I sum all the columns. This works fine, except for the fact that when there is an empty cell the outcome is wrong. Because I set for example A as 10. The answer for that cell is 10, because he sees an empty cell as 0, i guess.

    So how do I skip these empty cells?

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Skip empty cell in formula

    Given the actual formula..
    =$S$2*EXP(-$R$2*B4)

    Which cell might be blank (S2 R2 or B4) ?
    And what result do you want when it is blank?

  3. #3
    Registered User
    Join Date
    07-01-2014
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    12

    Re: Skip empty cell in formula

    Quote Originally Posted by Jonmo1 View Post
    Given the actual formula..
    =$S$2*EXP(-$R$2*B4)

    Which cell might be blank (S2 R2 or B4) ?
    And what result do you want when it is blank?
    B4 is just the first cell but in like 75% of the rows there is at least one cell empty. S2 and R2 are both the parameters that I can set. So the B4 changes over B4 to P10013.

    When its blank it should just be zero. So that when it is summed up, it is left out.

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Skip empty cell in formula

    Try

    =IF(B4="",0,$S$2*EXP(-$R$2*B4))

  5. #5
    Registered User
    Join Date
    07-01-2014
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    12

    Re: Skip empty cell in formula

    Quote Originally Posted by Jonmo1 View Post
    Try

    =IF(B4="",0,$S$2*EXP(-$R$2*B4))
    Thank you, thats it. It is much more easier than I had anticipated.

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Skip empty cell in formula

    You're welcome.

+ 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] Need help : Vlookup/index with skip blank/empty cell, problem!!!!
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-25-2013, 12:18 AM
  2. [SOLVED] Skip/Do not run Macro on the cell if empty/blank
    By Talazem in forum Excel General
    Replies: 3
    Last Post: 11-01-2012, 06:25 PM
  3. [SOLVED] TimeSheet Help: Skip empty cells in a formula that lists a date range
    By CpnVenice in forum Excel - New Users/Basics
    Replies: 14
    Last Post: 06-23-2012, 06:31 AM
  4. Formula/Macro for copying, skip empty cells
    By joscar in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-16-2011, 06:04 PM
  5. If cell is empty then run macro otherwise skip this macro
    By alexmillner@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2006, 11:00 AM

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