+ Reply to Thread
Results 1 to 4 of 4

When Cell Value lies between two values?

  1. #1
    Registered User
    Join Date
    12-09-2006
    Posts
    2

    When Cell Value lies between two values?

    Hi guys. Need a bit of help!

    I am trying to construct a True/False formula, where it is True when the value of the cell lies between 0.9 and 1.1, or 1.9 and 2.1, or 2.9 and 3.1.

    Am banging my head against the wall in frustration as I'm getting nowhere!

    Anyone out there able to save my headache, not to mention my wall??!!

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Try this for now

    =IF(AND(A1>=0.9,A1<=1.1),TRUE,IF(AND(A1>=1.9,A1<=2.1),TRUE,IF(AND(A1>=2.9,A1<=3.1),TRUE,FALSE)))

    Will try to shorten

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    12-09-2006
    Posts
    2
    Works like a charm!

    Thank you SO much! Have been out of bed since 6am trying to figure this out! Much appreciated!

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    No problem

    This is a little shorter

    =IF(OR(AND(A1>=0.9,A1<=1.1),AND(A1>=1.9,A1<=2.1),AND(A1>=2.9,A1<=3.1)),TRUE,FALSE)

    VBA Noob

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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