Search : in
By :

Change cell color every 7 days

Last answer on Oct 19, 2009 2:13:32 pm BST kusart, on Oct 14, 2009 8:11:35 am BST 
 Report this message to moderators

Hello,
Is there any way to change a cell's color once a week on a certain day on a regular basis. Example, only on Wednesdays cell color changes to pink automatically. Then reverts back to its original color on every other day untill Wednesday comes around again, and so on. . .

Configuration: Windows XP
Firefox 3.0.1

Best answers for « change cell color every 7 days » in :
Changing the color of the command prompt(shell) Show Changing the color of the command prompt(shell) Purpose Methods Purpose Changing the color of characters in the prompt (or shell), make them more readable. If you are using colors group, you can sense by color, this will eliminate the...
[Excel]changing cell formula to text Show[Excel]changing cell formula to text Issue Solution Notes Issue Consider that I have: In cell A4, it contains a formula =Sum(A1:B3)+A3/B2. How to extract this formula in cell A6 as a string of text? That is ... I want cell A6...
Repainting a cell using excel VBA ShowRepainting a cell using excel VBA Issue Solution Note Issue I am writing a code in excel VBA to generate a report.I am totally new to VBA.Here's my code Private Sub CommandButton1_Click() Dim a1 As Integer Dim d1 As Integer Dim...
[Mozilla Firefox] fonts and colors Show[Mozilla Firefox] fonts and colors It is possible with Mozilla firefox to use a custom background color and fonts (color of your choice), or even change the color of links ... To make these changes: Open Firefox and click on...
Download Change Folder Icons ShowAs its name suggests, Change Folder Icons will allow you to search and replace quickly the standard icon of a folder or disk. Easy to use, simply press the right button of the mouse on a folder by selecting the item “Change Folder Icon”. The icons...
Download Active Wallpaper Changer ShowDescription The application is designed by ABF software, Inc. Active WallPaper Changer is a tool that enables you to create a calendar. Simple and easy to use, the application has been awarded from various popular places. The application enables you...
Worksheet - Cells ShowThe Concept of a Cell A "cell" is the intersection between a line (horizontal) and a column (vertical) on a worksheet. Thus, the name of the line combined with the name of the column gives the cell's coordinates (the term address is sometimes also...
Backgrounds ShowAdding a Background Image A background image for a web page can be set using the tag: Attribute Visual Effect BACKGROUND="image" Displays image as background bgcolor="name_of_Colour or #XXXXXX" Displays the given colour...
Spreadsheets - Cell Selection ShowCell Selection Spreadsheets are powerful tools for working with data. However, to work with data, it is necessary to have tools to rapidly choose the required cells. Line Selection An entire line can be chosen by clicking directly on the line...

1

venkat1926, on Oct 14, 2009 11:00:24 am BST

Try this. I could not test as I have to wait for seven days to completely test. Today 14th October it works.

first type in A1
=today()

right click the tab of the sheet and click view code. and in that window copy this code


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$1" Then Exit Sub

If Weekday(Range("A1")) Mod 7 = 4 Then
Range("B1").Interior.ColorIndex = 3
Else
Range("B1").Interior.ColorIndex = xlNone

End If
End Sub



everyday automatically the entry in A1 will change to that day
now when the week day of A1 becomes Wednesday the color in B1 will change to red.

check for a few days and confirm whether it is ok

Reply to venkat1926

2

kusart, on Oct 14, 2009 11:26:28 am BST

Thanks dude. You obviously put a lot of effort into this formula, but I was hoping for something simpler which I could insert into certain cells of my choice via 'conditional formatting' of the individual cells, etc. What you gave my up there is way over my head.

Reply to kusart

3

 Trowa, on Oct 19, 2009 2:13:32 pm BST

Hi Kusart,

Use this formula to determine the day (in cell A1 for example):
=weekday(today())
This formula give you a number: Sunday=1, Monday=2 etc.
Now you can use conditional formating.
Use formula is, and input A1=4 (4 for wednesday) and apply your color.
For your next condition use this formula: A1<>4 and apply your color.

Is this the answer you were looking for?

Best regards,
Trowa

Reply to Trowa