• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Need help with an Excel IF formula

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Need help with an Excel IF formula

    I'm using an IF formula that says =IF(B1="ABC", "DEF", <Do nothing>), but I don't know how to define the Do Nothing. If I put in double quotes it blanks the cell, which I don't want. Do the esteemed panel have any suggestions?
    ǝןqqıʍ

    #2
    What do you want the 'do nothing' part of the clause to do? Putting double quotes in the 'do nothing' part does exactly that. You could always use "N/A"

    Comment


      #3
      Originally posted by DiscoStu View Post
      I'm using an IF formula that says =IF(B1="ABC", "DEF", <Do nothing>), but I don't know how to define the Do Nothing. If I put in double quotes it blanks the cell, which I don't want. Do the esteemed panel have any suggestions?
      You can't 'do nothing' because by definition you have your IF statement in the cell. All you can do is change what the IF produces. What's wrong with a blank? What do you want it to be instead?
      Cooking doesn't get tougher than this.

      Comment


        #4
        Originally posted by TheBigYinJames View Post
        You can't 'do nothing' because by definition you have your IF statement in the cell. All you can do is change what the IF produces. What's wrong with a blank? What do you want it to be instead?
        It could be any one of a number of different values, all of which will be entered by hand, which is why I don't want it to go blanking them.
        ǝןqqıʍ

        Comment


          #5
          Originally posted by DiscoStu View Post
          It could be any one of a number of different values, all of which will be entered by hand, which is why I don't want it to go blanking them.
          As soon as you put an IF statement in there, that is what is in the cell. It can't be 'any number of values' - it has to be the IF statement.

          So you want your user to overwrite your IF formula by typing into it?
          Cooking doesn't get tougher than this.

          Comment


            #6
            Originally posted by TheBigYinJames View Post
            As soon as you put an IF statement in there, that is what is in the cell. It can't be 'any number of values' - it has to be the IF statement.

            So you want your user to overwrite your IF formula by typing into it?
            Yes, pretty much.
            ǝןqqıʍ

            Comment


              #7
              Originally posted by DiscoStu View Post
              Yes, pretty much.
              Well why worry if it's blank beforehand then?
              Cooking doesn't get tougher than this.

              Comment


                #8
                Originally posted by TheBigYinJames View Post
                Well why worry if it's blank beforehand then?
                I guess you're right, thanks James!
                ǝןqqıʍ

                Comment


                  #9
                  Maybe you need to turn this around and check for the user entry first, two columns for this to work, with the IF function checking for user entry and the original check. Something like:

                  IF(A1<>"", "", IF(B1="ABC", "DEF", ""))

                  Comment


                    #10
                    Originally posted by DiscoStu View Post
                    I guess you're right, thanks James!
                    I'm just more concerned you're trying to do something else here than meets the eye If there are values already on the sheet you want to preserve, you'll need to put your IF somewhere else to avoid overwriting them. Generally it's not a good idea to let your users overwrite your formulas (you should lock them) - give them an input area for data, then lock your calculated fields.
                    Cooking doesn't get tougher than this.

                    Comment

                    Working...
                    X