• IF Formula…Values Between (XP)

    Author
    Topic
    #405453

    Is there a way to have an if-then statement based on numbers between two values?

    I have two values: 0.21875 and 0.958333333

    I need anything between those two numbers to return “True”. Anything less than 0.21875 or greater than 0.958333333 to return “False”.

    The highest possible number is 1.0000

    I keep running into dead ends.

    Thanks!

    Viewing 1 reply thread
    Author
    Replies
    • #833039

      Try this:
      =IF(AND(A1>=0.21875,A1<=0.958333333),"True","False")

      • #843963

        I need to use an IF statement to verify that 10 cells on one row are blank. If all ten are blank, then I will hide the row. Do I use an And statement as well? How should I do this?

        • #843969

          Something like this perhaps?

          =if(counta(A1:J1)=0,”All 10 are blank”, “at least 1 is not blank”)

          Change the range as appropriate.
          Steve

          • #843985

            Excellent. For the true statement, I would like to hide the entire row. Can a true statement perform an action. If it is false, I will do nothing.

            • #843987

              No you will have to manually do it or create a macro. Formulas can do no actions.

              Steve

            • #843988

              No you will have to manually do it or create a macro. Formulas can do no actions.

              Steve

          • #843986

            Excellent. For the true statement, I would like to hide the entire row. Can a true statement perform an action. If it is false, I will do nothing.

        • #843970

          Something like this perhaps?

          =if(counta(A1:J1)=0,”All 10 are blank”, “at least 1 is not blank”)

          Change the range as appropriate.
          Steve

        • #843977

          “then I will hide the row”

          I take it you mean you will manually hide the row? and without knowing what exactly is in the row of cells you want to review I assumed number entries. If you have numbers across column A to J, in K1 you could place

          =COUNTBLANK(A1:J1)

          you can copy this down as far as needed. If it calculates to 10, meaning 10 blanks, then you can manually hide that row.
          You would need some VBA code if you want the formula to calculate and then for Excel to automatically hide the row.

          yoyoPHIL

        • #843978

          “then I will hide the row”

          I take it you mean you will manually hide the row? and without knowing what exactly is in the row of cells you want to review I assumed number entries. If you have numbers across column A to J, in K1 you could place

          =COUNTBLANK(A1:J1)

          you can copy this down as far as needed. If it calculates to 10, meaning 10 blanks, then you can manually hide that row.
          You would need some VBA code if you want the formula to calculate and then for Excel to automatically hide the row.

          yoyoPHIL

      • #843964

        I need to use an IF statement to verify that 10 cells on one row are blank. If all ten are blank, then I will hide the row. Do I use an And statement as well? How should I do this?

    • #833040

      Try this:
      =IF(AND(A1>=0.21875,A1<=0.958333333),"True","False")

    Viewing 1 reply thread
    Reply To: IF Formula…Values Between (XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: