+ Reply to Thread
Results 1 to 4 of 4

Conditional Formatting For Cells with Multiples of a Certain Number

  1. #1
    Registered User
    Join Date
    12-06-2015
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2016
    Posts
    6

    Conditional Formatting For Cells with Multiples of a Certain Number

    In Conditional Formatting, what is the correct formula for rows which contain multiples of a certain number, to be formatted the same way, across all columns?

    Scenario: Column A is a list of day numbers, (1,2,3,4,5 . . .1050). For the rows in which day numbers in $A are a multiple of / divisible by 30, I want each entire row across A to J columns to be filled solid yellow.

    It is important to note that the $A rows in which a day number divisible by 30 occurs will change from use to user due to different data inputs on a linked worksheet. (Day 30 for example may occur on $A row 47 in the attached sample, but for other users will most probably occur on different $A rows).

    Sample file attached.

    I have this easily working for the first value of 30, with the following formatting:

    Conditional Formatting
    =$A$18:$J$1050
    Rule Type: Use a formula to determine which cells to format
    Formula =$A18=30
    Formatting = <Fill> <Yellow>

    But I also want the day numbers in $A that are multiples of 30, (i.e. 60, 90, 120, 150 . . . 1050), to be formatted in the same manner and across from columns A to J. I’ve tried variations of the following formula to no avail:

    Formula =$A18=30,60,90,120,150 …………. etc. but this incorrect.

    Details in my worksheet (sample attached):

    A1 to A14 – Text instructions, spacing and similar (no values, formulas or functions)
    A15 =1 <Hidden reference trigger from which day count starts>
    A17 <text> DAY #
    A18 =IF(J18<100),(A15),(“”) where (J18<100) is present to permit calculations until J18 equals 100%
    A19 =IF((J18>=100),(“”),(A18+1) ………….<cell value is2>
    A20 same formula as A20 with cell value of 3
    With the formula repeating itself each row thereafter, such that ensuing cell values are. . .
    A21 is 4
    A22 is 5
    A23 is 6
    A24 is 7
    A25 is 8
    And so on to day number 1050.

    In summary, I need the correct conditional formatting formula so that all rows are highlighted across all columns from A to J for all $A cells that have a value evenly divisible by 30.

    Many thanks.
    James

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Conditional Formatting For Cells with Multiples of a Certain Number

    Hi,

    See attached.

    The CF in A18 is

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,412

    Re: Conditional Formatting For Cells with Multiples of a Certain Number

    The formula you should use for your CF is:

    =MOD($A18,30)=0

    instead of:

    =$A18=30

    MOD gives the remainder after division (in this case by 30).

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    12-06-2015
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2016
    Posts
    6

    Re: Conditional Formatting For Cells with Multiples of a Certain Number

    Excellent and perfect and speedy - thank you - James

+ 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. Replies: 5
    Last Post: 05-08-2015, 12:08 PM
  2. [SOLVED] Conditional formatting for date field, minutes = multiples of 15 only
    By trevor69 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-08-2015, 02:55 AM
  3. [SOLVED] Conditional Formatting: Red fill for cells A1 through Y192 on row number in cell value
    By nenadmail in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-28-2014, 08:00 AM
  4. Conditional Format multiples of a number
    By JakeMann in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-13-2013, 09:25 AM
  5. [SOLVED] increasing a cells number by multiples
    By Earthfury in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 08-09-2012, 02:50 AM
  6. [SOLVED] Conditional Formatting - shading cells based on number
    By jennbates in forum Excel General
    Replies: 7
    Last Post: 05-04-2012, 08:39 AM
  7. Count multiples within conditional formula?
    By Nate Westcott in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-31-2011, 04:50 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