+ Reply to Thread
Results 1 to 10 of 10

Conditional formating for weeks with odd numbers

  1. #1
    Registered User
    Join Date
    07-19-2019
    Location
    Sweden
    MS-Off Ver
    Excel for office 365
    Posts
    35

    Conditional formating for weeks with odd numbers

    Hello,

    I have been trying to make a conditional formating for my table rows where the column weeks.

    week.JPG

    I have already managed to alternate the colors but I would like to have the weeks with odd numbers to start with a different alternated colour to be easier to identify where the weeks finish and start.

    right niw I use this code: =MOD(ROW()/2,1)>0


    thank you in advance,
    best regards
    Luis
    Last edited by AliGW; 07-19-2019 at 06:38 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,463

    Re: Conditional formating for weeks with odd numbers

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are new, I have done it for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,627

    Re: Conditional formating for weeks with odd numbers

    Pl upload a sample file.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  4. #4
    Registered User
    Join Date
    07-19-2019
    Location
    Sweden
    MS-Off Ver
    Excel for office 365
    Posts
    35

    Re: Conditional formating for weeks with odd numbers

    Hi, please find a sample attached.

    thank you in advance,
    best regards,
    Luis
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,627

    Re: Conditional formating for weeks with odd numbers

    Work sheet event Worksheet_activate is used.
    Code
    Please Login or Register  to view this content.
    To paste the code.

    Right click on Sheet tab
    view code
    VB window opens
    Paste the code.
    Close window.

    When the sheet is activated cells will be colored.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    07-19-2019
    Location
    Sweden
    MS-Off Ver
    Excel for office 365
    Posts
    35

    Re: Conditional formating for weeks with odd numbers

    Hi,

    thank you for looking into this. I was more meaning something like the image below:

    Attachment 633245

    thank you again,
    best regards,
    Luis

  7. #7
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,627

    Re: Conditional formating for weeks with odd numbers

    Attachment not opening.

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,124

    Re: Conditional formating for weeks with odd numbers

    As I can't see your image
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,629

    Re: Conditional formating for weeks with odd numbers

    (How to) Upload a Workbook directly to the Forum
    (please do not post pictures or links to worksheets)
    • Click Advanced next to "Post Quick Reply" button at the bottom right of the editor box.
    • Scroll down until you see "Manage Attachments",
    • Click the "Choose" button at the upper left (upload from your computer).
    • Select your file, click "open", click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Close the Attachment Manager window.
    • Click "Submit Reply"
    Note: Please do not attach password protected workbooks/worksheets
    Ensure to disable any Workbook Open/Autorun macros before attaching!
    Ben Van Johnson

  10. #10
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,629

    Re: Conditional formating for weeks with odd numbers

    Do you really need the word "week" in column B since the header is Weeks?
    1. Find/Replace 'week' in column B3..
    2. Custom number format: "Week: " #
    * then just enter the week number in the cell
    ------------------------------
    Conditional Format:
    1. Select B3:Dx
    2. For even weeks use: =ISEVEN($B3), select desired fill color
    3. For odd weeks: =ISODD($B3)...
    Attached Files Attached Files
    Last edited by protonLeah; 07-19-2019 at 02:42 PM.

+ 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. Conditional formating based on other conditional formating?
    By OldManExcellor in forum Excel General
    Replies: 11
    Last Post: 09-14-2014, 02:20 PM
  2. Replies: 5
    Last Post: 03-14-2014, 04:03 AM
  3. Replies: 4
    Last Post: 01-23-2014, 10:14 AM
  4. Conditional formating-What formula do i need to use in conditional formating
    By warrima in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-07-2009, 12:33 AM
  5. Replies: 6
    Last Post: 08-14-2006, 05:00 PM
  6. Replies: 2
    Last Post: 03-27-2006, 12:10 PM
  7. Install dates formating using conditional formating?
    By Jerry Eggleston in forum Excel General
    Replies: 2
    Last Post: 11-09-2005, 01:49 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