none
Example of Excel Formula

    Question

  • I'm not very familiar with Excel language and it seems to be fairly different from microsoft access language. How would one write out a formula to conditionally format a value within a cell that is NOT between two numbers?

    Thanks in advance!


    Sarah Beth

    Monday, May 07, 2012 1:56 PM

Answers

  • Let's say that you want to format B2:B25 this way.

    You need to write the formula for the first cell in the range, B2 in this example. If you use relative cell references, Excel will automatically adjust the formula for the other cells in the range.

    The formula would be:

    =OR(B2<18,B2>65)


    Regards, Hans Vogelaar

    • Marked as answer by SarahBLSU Monday, May 07, 2012 2:41 PM
    Monday, May 07, 2012 2:40 PM

All replies

  • You don't need a formula for that: let's say that you want to highlight the cell if its value is not between 18 and 65.

    Select the cell.

    On the Home tab of the ribbon, click Conditional Formatting > New Rule...

    Select 'Format only cells that contain'.

    Leave the first dropdown set to 'Cell Value'.

    Select 'not between' from the second dropdown.

    Enter 18 and 65 in the boxes next to it.

    Click Format...

    Specify the desired formatting, for example a text color in the Font tab, and/or a background color in the Fill tab.

    Click OK twice.


    Regards, Hans Vogelaar

    Monday, May 07, 2012 2:24 PM
  • If you were to write out a formula for this, how would it be written?

    Sarah Beth

    Monday, May 07, 2012 2:36 PM
  • Let's say that you want to format B2:B25 this way.

    You need to write the formula for the first cell in the range, B2 in this example. If you use relative cell references, Excel will automatically adjust the formula for the other cells in the range.

    The formula would be:

    =OR(B2<18,B2>65)


    Regards, Hans Vogelaar

    • Marked as answer by SarahBLSU Monday, May 07, 2012 2:41 PM
    Monday, May 07, 2012 2:40 PM