Results 1 to 5 of 5
  1. #1
    DavidQMP is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2016
    Posts
    8

    Switch Formula & Between two values

    Hi,



    Is there a way to show any values between 0-0.2 as "Red", any between 0.2 and 0.4 as Orange etc? I'm not sure whether there is a different operator I'm missing..

    Colour: Switch([Overall Rating]>0,"Red",[Overall Rating]>0.2,"Orange",[Overall Rating]>0.4,"Yellow",[Overall Rating]>0.6,"Green",[Overall Rating]>0.8,"Gold")

    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    set the conditional formatting

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    You don't need a different operator, you need a different order. Switch returns the value for the first test that is met. With your test, everything meets the first one. Test in the opposite direction: <.2, <.4, etc.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    DavidQMP is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2016
    Posts
    8
    Quote Originally Posted by pbaldy View Post
    You don't need a different operator, you need a different order. Switch returns the value for the first test that is met. With your test, everything meets the first one. Test in the opposite direction: <.2, <.4, etc.
    Ahhh thank you!!

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 19
    Last Post: 07-13-2015, 10:15 AM
  2. Replies: 41
    Last Post: 05-29-2015, 02:58 PM
  3. IIF or Switch or ??
    By pj33558 in forum Queries
    Replies: 8
    Last Post: 04-21-2014, 11:44 AM
  4. Replies: 1
    Last Post: 06-29-2012, 01:22 PM
  5. Replies: 2
    Last Post: 06-09-2011, 12:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums