+ Reply to Thread
Results 1 to 6 of 6

conditionally format cell based on value in array

  1. #1
    Registered User
    Join Date
    04-22-2016
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    22

    conditionally format cell based on value in array

    I have a range A1:H53 indicating the weeks of a year. col A is the week number, col B to H are the days of the week (starting monday).
    each cell in the range contains the date values (see the example)
    I'd want that the value in col a (i.e; the week number) is highlighted if today's date falls within that week.
    for example, if today is 22/04/2016, the value "16" in column A should be highlighted

    15 11/04/2016 12/04/2016 13/04/2016 14/04/2016 15/04/2016 16/04/2016 17/04/2016
    16 18/04/2016 19/04/2016 20/04/2016 21/04/2016 22/04/2016 23/04/2016 24/04/2016
    17 25/04/2016 26/04/2016 27/04/2016 28/04/2016 29/04/2016 30/04/2016 1/05/2016

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: conditionally format cell based on value in array

    See attached for one way of doing this using conditional formatting.

    BSB
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: conditionally format cell based on value in array

    Select A1

    Conditional Formatting
    New Rule
    Use a formula to determine...

    =COUNTIF(B1:H1,TODAY())

    Format as required
    Use Format painter (paintbrush icon) to copy to other cells in coloumn A
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Registered User
    Join Date
    04-22-2016
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    22

    Re: conditionally format cell based on value in array

    Special-K thank you!!!

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: conditionally format cell based on value in array

    Beaten to the punch

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: conditionally format cell based on value in array

    Another one...

    Select the range A1:A53

    Conditional formatting

    Formula: =OR(B1:D1=TODAY())
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. Conditionally format entire row based on cell selection
    By Geogee in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-18-2015, 07:04 AM
  2. Replies: 1
    Last Post: 07-03-2014, 06:33 AM
  3. Conditionally format currency based on another cell
    By hugowhere in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2014, 03:41 PM
  4. Replies: 7
    Last Post: 11-25-2013, 02:19 AM
  5. [SOLVED] Conditionally format cell based on dates within a number of days apart
    By mjy58 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-24-2013, 06:01 PM
  6. Conditionally Format Row Based on Leading Cell
    By 605Scorpion in forum Excel General
    Replies: 7
    Last Post: 06-12-2010, 08:26 AM
  7. Conditionally change number format based on another cell's value
    By Fidd$ in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-03-2009, 07:58 AM

Tags for this Thread

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