Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Not in KC anymore
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IF Formula...Values Between (XP)

    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!

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Posts
    3,788
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: IF Formula...Values Between (XP)

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

  3. #3
    New Lounger
    Join Date
    Jun 2004
    Location
    Itasca, Illinois, USA
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IF Formula...Values Between (XP)

    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?

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: IF Formula...Values Between (XP)

    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

  5. #5
    Lounger
    Join Date
    Feb 2004
    Location
    Buffalo, New York, Wales
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IF Formula...Values Between (XP)

    "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

  6. #6
    New Lounger
    Join Date
    Jun 2004
    Location
    Itasca, Illinois, USA
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IF Formula...Values Between (XP)

    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.

  7. #7
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: IF Formula...Values Between (XP)

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

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •