+ Reply to Thread
Results 1 to 10 of 10

If then statement help

  1. #1
    Registered User
    Join Date
    09-16-2013
    Location
    Amherst MA
    MS-Off Ver
    Excel 2003
    Posts
    12

    If then statement help

    I'm trying to have excel look at a cell and if it is blank, then return a blank in the computation cell, but if there is data, then I want it to complete a calculation that I have created.

  2. #2
    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 then statement help

    Hi and welcome to the forum

    your formula should look something like this:

    =IF(A1="","","do this")
    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

  3. #3
    Registered User
    Join Date
    09-16-2013
    Location
    Amherst MA
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: If then statement help

    Thanks for the reply.
    Not sure how to make it give me the response, based on the two conditions.
    If the cell is blank then I want a blank cell response.
    If the cell has data, then I want it to compute the calculation based on the numberic data.

  4. #4
    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 then statement help

    =IF(A1="","" -- this part says that if cell is blank ("") return blank ("")

    "do this" says do the calculation.

  5. #5
    Valued Forum Contributor
    Join Date
    05-13-2010
    Location
    Belo Horizonte, Brazil
    MS-Off Ver
    Excel 2003; 2007
    Posts
    441

    Re: If then statement help

    Kdhowery, Good Afternoon.

    AlKey gave you the right answer.

    But as you didn't mention what are your "the calculation based on the numeric data." he put "do this" as an alternative to blank cell.

    Please mention what are yours calculation in order that we can complete your formula, to help you to finish your job.

    IŽll wait for your data.
    ...If my answer helped you, Please, click on. * Add Reputation (at left)

    Best regards.
    Marc?lio Lob?o

  6. #6
    Registered User
    Join Date
    09-16-2013
    Location
    Amherst MA
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: If then statement help

    OK
    If there is not data in C16, then I want I16 to be blank.
    If there IS data in C16, then I want the following calculation done for I16. I15+C16-F16

    I keep getting error messages.

  7. #7
    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 then statement help

    This means that you have to write you formula in I16

    =IF(C16="","",SUM(I15,C16)-F16)

  8. #8
    Registered User
    Join Date
    05-29-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: If then statement help

    Quote Originally Posted by AlKey View Post
    This means that you have to write you formula in I16

    =IF(C16="","",SUM(I15,C16)-F16)
    Pay attention as you write "=if" in the formula bar. Excel will explain the arguments. The first is the condition to be met, so

    =IF(C16="","",SUM(I15,C16)-F16)

    Says:

    If C16 = "" (The quotations with nothing between means the value in that cell is blank), THEN (the comma starts the then instruction)
    , "" says then there should be nothing in THIS cell.

    The next comma starts the "else" command. So if there is anything in C16, do this other command. Namely, Sum(I15,C16)-F16.

    A lot of people don't realize what the commas are doing (separating instructions) so it's not exactly intuitive to read. I hope that helps and that I was clear.

  9. #9
    Registered User
    Join Date
    09-16-2013
    Location
    Amherst MA
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: If then statement help

    It worked! Thank you so much everyone!
    I'm an excel user, not a formula writer, so this new task was daunting. You are all awesome!

  10. #10
    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 then statement help

    You're Welcome. Don't forget to thank those who helped by clicking on Add Reputation * and please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark thread as Solved).

+ 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. VBA Compile Error : line number or label or statement or end of statement
    By excellearner121 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2013, 06:41 PM
  2. [SOLVED] Nested If Statement - ISBLANK and ISNA in same statement?
    By Janc in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-23-2013, 09:00 AM
  3. Replies: 4
    Last Post: 06-01-2012, 10:05 AM
  4. Replies: 4
    Last Post: 05-16-2012, 05:33 PM
  5. [SOLVED] Utilize a Select Case Statement in Target Intersect Statement
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2009, 08:55 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