Change cell colour by week

xlqs

New Member
Joined
Jul 3, 2023
Messages
5
Platform
  1. Windows
Hi, I am trying to figure out how to change the cell colour by what week it is.
So in the top row I have the week number (atm just a number, no special formating) and I would like that cell to change colour as the week goes by. I've tried a few different formulas with little success (week 25, 26, 27 in the picture).

Grateful for any help and tips!
 

Attachments

  • Skärmbild 2023-07-03 115226.png
    Skärmbild 2023-07-03 115226.png
    2.3 KB · Views: 17

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
@xlqs. Welcome.
Something like below?

MrExcel July.xlsm
BCDEFGHI
1
22526272829
3
4
Sheet3
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:I2Expression=AND(C2>0,C2<=WEEKNUM(TODAY(),1))textNO
 
Upvote 0
@xlqs. Welcome.
Something like below?

MrExcel July.xlsm
BCDEFGHI
1
22526272829
3
4
Sheet3
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:I2Expression=AND(C2>0,C2<=WEEKNUM(TODAY(),1))textNO
I tried that formula but with no effect. Do I need to lable the weeks as dates? I've tried looking in to this too, but not sure how I do that without needing to add the actual date of each week.
 
Upvote 0
That exact formula, or suitably edited to match the first cell of your CF applies to range?
 
Upvote 0
That exact formula, or suitably edited to match the first cell of your CF applies to range?
edited to match my range. Do I need to write the formula in Swedish if the excel is in swedish? Or do english formulas work also? I tried posting this question in swedish but was told by the website I'm not allowed to do that since I asked it in english already.
 
Upvote 0
I honestly don't know what impact would be if you are using Swedish Excel.
I do not see any reason why equivalent 'Swedish' formulas should not exist and work.
I assume that at least, your regional delimiter will be different, ie not a comma?
The numbers in my example are just 25, 26 27... in General format.
 
Upvote 0
Hi, I am trying to figure out how to change the cell colour by what week it is.
So in the top row I have the week number (atm just a number, no special formating) and I would like that cell to change colour as the week goes by. I've tried a few different formulas with little success (week 25, 26, 27 in the picture).
From that statement I am not able to understand which cells should change color and in which condition.
Could you attach an image with more conditions an more colors and explain in some more details?
 
Upvote 0
Do I need to write the formula in Swedish if the excel is in swedish?
Yes you will which is
Excel Formula:
=OCH(C2>0;C2<=VECKONR(IDAG();1))
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,929
Messages
6,175,447
Members
452,642
Latest member
acarrigan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top