+ Reply to Thread
Results 1 to 5 of 5

VBA - Highlight Worksheet Tab Based on Week Formula

  1. #1
    Registered User
    Join Date
    02-04-2018
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    8

    VBA - Highlight Worksheet Tab Based on Week Formula

    Hi all,

    I am creating new worksheets on a weekly bases in one excel file to keep track of work stuff.
    As I need to refer back and forth between worksheets, I like to have a worksheet tab highlight itself if the week that the worksheet is created is the current week.

    In my current worksheet, I have grid A1 using the formula =WEEKNUM(F1), where F1 has the date that the worksheet was created.

    Is there a formula that looks at A1 and highlights the worksheet tab if the value in A1 falls within the current week?

    For example,
    Cell A1 using the formula =WEEKNUM(F1) will return the value of "26", and this week is week 26 of the year. Hence this worksheet tab will be highlighted in Red.

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

    Re: VBA - Highlight Worksheet Tab Based on Week Formula

    Try this:
    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: VBA - Highlight Worksheet Tab Based on Week Formula

    Try
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-04-2018
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    8

    Re: VBA - Highlight Worksheet Tab Based on Week Formula

    Thanks for the quick replies. I have a question, the codes can be pasted under "This Workbook" right?

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: VBA - Highlight Worksheet Tab Based on Week Formula

    Could be..... prefer to a standard module.

+ 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. Highlight Columns based on a week day
    By rami10 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-23-2016, 01:37 AM
  2. [SOLVED] Highlight week number using Conditional formatting - shows incorrect week
    By spliffter in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 02-26-2016, 09:52 AM
  3. Wanting to print specific worksheet based on current week
    By TheTubaGeek in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-08-2014, 07:54 AM
  4. [SOLVED] Highlight Cells based on Cell Reference on another Worksheet
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-28-2014, 08:24 AM
  5. Replies: 4
    Last Post: 04-25-2014, 12:30 PM
  6. Replies: 11
    Last Post: 04-06-2011, 02:33 PM
  7. Highlight Only Current Week Based on Date
    By Kumara_faith in forum Excel General
    Replies: 10
    Last Post: 11-17-2010, 04:52 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