+ Reply to Thread
Results 1 to 9 of 9

formula for conditional formatta divisible by 5

  1. #1
    Forum Contributor
    Join Date
    10-24-2012
    Location
    San Diego, USA
    MS-Off Ver
    Excel 2019
    Posts
    844

    formula for conditional formatta divisible by 5

    hi, i want to use a formula in the conditional formatting to be divisible by 5, how can i accomplish this? for example, i want to be in red , if its 5 or 10 or 15 or 20 or 25 and so on

    so my formula is '=sum(B:B)' if this sums upto 5, or 10 or 15 or 20 ..if it sums up to any intervals of 5, then to place the conditional formatting
    Last edited by chubbychub; 10-25-2020 at 07:44 PM.

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: formula for conditional formatta divisible by 5

    Maybe this formula for the conditional formatting:
    =MOD(cell with value,5)=0

    Good luck!

  3. #3
    Forum Contributor
    Join Date
    10-24-2012
    Location
    San Diego, USA
    MS-Off Ver
    Excel 2019
    Posts
    844

    Re: formula for conditional formatta divisible by 5

    it doesnt allow me to use that formula in excel 2019
    says 'you may not use reference operators (such as unions, intersections and ranges)'
    Last edited by chubbychub; 10-25-2020 at 07:58 PM.

  4. #4
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: formula for conditional formatta divisible by 5

    Hit Conditional Formatting on the Home ribbon;
    New rule
    Use a formula to determine which cells must be formatted
    In the "Format values in which this formula is true" box, paste that formula from post #2;
    Select desired formatting
    OK

  5. #5
    Forum Contributor
    Join Date
    10-24-2012
    Location
    San Diego, USA
    MS-Off Ver
    Excel 2019
    Posts
    844

    Re: formula for conditional formatta divisible by 5

    that is exactly what i did , and this is what comes up when i click OK
    'you may not use reference operators (such as unions, intersections, and ranges) or array constants for Conditional formatting criteria. '

  6. #6
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,914

    Re: formula for conditional formatta divisible by 5

    Try this:

    =($B2<>"")*(MOD(SUM($B$2:$B2),5)=0)

  7. #7
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: formula for conditional formatta divisible by 5

    I did it here and it works just fine.
    Please check file attached.
    If problem persists, please post a sample workbook here, as per instructions at yellow banner above.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    10-24-2012
    Location
    San Diego, USA
    MS-Off Ver
    Excel 2019
    Posts
    844

    Re: formula for conditional formatta divisible by 5

    Estevaoba yes it does work, you replaces the 'cell with values' with the cell with values, i just pasted the whole thing. Duh me! .. so silly of me. thank you all Estevaoba and Phuocam ! thread solved and reps added, thank youagain!

  9. #9
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: formula for conditional formatta divisible by 5

    You're welcome. Glad to help.
    Thank you for the feedback, for marking the thread SOLVED and for the rep points added.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. formula: If cell is divisible by 10, then TRUE.. how to set it up?
    By cat3appr in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-10-2019, 11:37 AM
  2. [SOLVED] conditional formatting based on a divisible factor minus 1 and age populated by bday issue
    By TravisD76 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-29-2019, 01:35 AM
  3. [SOLVED] Sum If Divisible by 100
    By sskgintl in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-07-2017, 12:03 AM
  4. Replies: 4
    Last Post: 09-10-2016, 06:56 AM
  5. [SOLVED] Formula to determine the first number evenly divisible by 2000
    By Ed_Collins in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-14-2015, 09:04 PM
  6. Replies: 5
    Last Post: 10-21-2005, 03:05 AM
  7. how do an @if formula to meet criteria where x is divisible by 12
    By lax_fan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-16-2005, 07:06 PM

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