1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Need help writing an "If" formula in Excel 2010

Discussion in 'Business Applications' started by McNaughton, Dec 28, 2010.

Thread Status:
Not open for further replies.
Advertisement
  1. McNaughton

    McNaughton Thread Starter

    Joined:
    Nov 7, 2010
    Messages:
    5
    Here is what I am trying to do in Excel 2010:

    If cell T9 is Yes then cell X9 will go blank.

    Any help would be greatly appreciated.

    Thanks:confused:
     
  2. Ent

    Ent Trusted Advisor

    Joined:
    Apr 11, 2009
    Messages:
    5,467
    First Name:
    Josiah
    The format for the if statement is
    =If(Condition, Response if true, Response if false)

    I would put this in X9
    =If(T9="yes", "", value currently in X9)
     
  3. slurpee55

    slurpee55

    Joined:
    Oct 20, 2004
    Messages:
    7,837
    The last part of your formula is a circular statement, Ent. You can't have X9 look for the value in X9 and return it.
    So the first half is fine, but for the latter you need a different value - "no" - for instance. Or possibly you meant
    =IF(T9="yes","",T9) ?
     
  4. Ent

    Ent Trusted Advisor

    Joined:
    Apr 11, 2009
    Messages:
    5,467
    First Name:
    Josiah
    I wouldn't have the reference X9, but the value that is currently in X9.
    For example if X9 is normally meant to be set to 7 (when T9 isn't yes), my formula would become
    =If(T9="yes", "", 7)
    Actually it works for a formula too: if X9 is meant to be set to =A9*4 (when T9 isn't yes), my formula would become
    =If(T9="yes", "", A9*4)

    As you note the formula =If(T9="yes", "", X9) is very much circular
     
  5. slurpee55

    slurpee55

    Joined:
    Oct 20, 2004
    Messages:
    7,837
    Ent, you stated
    But that makes the value currently in X9 "=If(T9="yes", "", value currently in X9)" - a circular formula. So that formula may not go into X9, period. That is my problem with your statement.
     
  6. Ent

    Ent Trusted Advisor

    Joined:
    Apr 11, 2009
    Messages:
    5,467
    First Name:
    Josiah
    Copying and pasting the value currently in X9 into the formula is different from placing the cell reference "X9" in the formula. I don't see a problem with the former.

    Let us say X9 has a value of 7.
    The value currently in X9 it is 7
    The formula I gave becomes =If(T9="yes", "", 7)
    That is not circular.
     
  7. slurpee55

    slurpee55

    Joined:
    Oct 20, 2004
    Messages:
    7,837
    If you mean X9 currently has, say, 7 in it and you change the formula to read =If(T9="yes", "", 7), then sure, that works.
    But generally one writes formulas to change dynamically - it would be better to leave X9 with the value of 7 and in Y9 enter the formula =If(T9="yes", "", X9).
     
  8. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/971258

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice