How to change background colour of column based upon column header date
up vote
1
down vote
favorite
I have a table in Excel which looks like
A B C D
1 01/01/2018 07/01/2018 14/01/2018 21/01/2018
2 some vale detail
3 value
For this question, we can assume the date is 10/01/2018 (DD/MM/YY)
Row 1 are my headers. Row 2 and 3 are the table body (content).
As you can see, column A and B are before 10/01/2018 where as column C and D are after 10/01/2018
What I'd like to do is change the background colour of the column based on this, so it's easy to see which column are in the past.
A google search suggests Conditional formatting and there is an option called A Date Occuring
, but that only has pre-defined date values, such as yesterday
, today
, tomorrow
etc, and no option for before today
! As such I'm now totally lost and not sure if this can be achieved.
microsoft-excel
add a comment |
up vote
1
down vote
favorite
I have a table in Excel which looks like
A B C D
1 01/01/2018 07/01/2018 14/01/2018 21/01/2018
2 some vale detail
3 value
For this question, we can assume the date is 10/01/2018 (DD/MM/YY)
Row 1 are my headers. Row 2 and 3 are the table body (content).
As you can see, column A and B are before 10/01/2018 where as column C and D are after 10/01/2018
What I'd like to do is change the background colour of the column based on this, so it's easy to see which column are in the past.
A google search suggests Conditional formatting and there is an option called A Date Occuring
, but that only has pre-defined date values, such as yesterday
, today
, tomorrow
etc, and no option for before today
! As such I'm now totally lost and not sure if this can be achieved.
microsoft-excel
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have a table in Excel which looks like
A B C D
1 01/01/2018 07/01/2018 14/01/2018 21/01/2018
2 some vale detail
3 value
For this question, we can assume the date is 10/01/2018 (DD/MM/YY)
Row 1 are my headers. Row 2 and 3 are the table body (content).
As you can see, column A and B are before 10/01/2018 where as column C and D are after 10/01/2018
What I'd like to do is change the background colour of the column based on this, so it's easy to see which column are in the past.
A google search suggests Conditional formatting and there is an option called A Date Occuring
, but that only has pre-defined date values, such as yesterday
, today
, tomorrow
etc, and no option for before today
! As such I'm now totally lost and not sure if this can be achieved.
microsoft-excel
I have a table in Excel which looks like
A B C D
1 01/01/2018 07/01/2018 14/01/2018 21/01/2018
2 some vale detail
3 value
For this question, we can assume the date is 10/01/2018 (DD/MM/YY)
Row 1 are my headers. Row 2 and 3 are the table body (content).
As you can see, column A and B are before 10/01/2018 where as column C and D are after 10/01/2018
What I'd like to do is change the background colour of the column based on this, so it's easy to see which column are in the past.
A google search suggests Conditional formatting and there is an option called A Date Occuring
, but that only has pre-defined date values, such as yesterday
, today
, tomorrow
etc, and no option for before today
! As such I'm now totally lost and not sure if this can be achieved.
microsoft-excel
microsoft-excel
edited Nov 20 at 8:54
asked Nov 20 at 8:47
MyDaftQuestions
45541642
45541642
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
I assume that your dates are set to the format DD-MM-YYYY in your regional settings in the Operating System so that Excel shall understand 1-12-2018 as 1st Dec 2018.
You have an actual table in Excel not just a set or rows and columns.
First remove any formatting from the table. Set the color formatting as None.
Now select Cells A2:A3 go to Conditional Formatting -->New Rule --> Use a Formula to determine which cells to format option.
Now enter the formula.
=DATE(YEAR(A$1),MONTH(A$1),DAY(A$1))<TODAY()
Select the color format that you desire.
Click OK and exit. Now the rule shall be applied to cells A2:A3.
Use a format painter and apply it to all other cells from rest of the columns.
Since it's a Table, as you add rows to it the Conditional Formatting shall get auto applied thereon.
If instead of TODAY() you wish to specify some other date e.g. 10-01-2018 then in place of TODAY() Use DATE function specifying Year, Month, Day as parameters to it.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
I assume that your dates are set to the format DD-MM-YYYY in your regional settings in the Operating System so that Excel shall understand 1-12-2018 as 1st Dec 2018.
You have an actual table in Excel not just a set or rows and columns.
First remove any formatting from the table. Set the color formatting as None.
Now select Cells A2:A3 go to Conditional Formatting -->New Rule --> Use a Formula to determine which cells to format option.
Now enter the formula.
=DATE(YEAR(A$1),MONTH(A$1),DAY(A$1))<TODAY()
Select the color format that you desire.
Click OK and exit. Now the rule shall be applied to cells A2:A3.
Use a format painter and apply it to all other cells from rest of the columns.
Since it's a Table, as you add rows to it the Conditional Formatting shall get auto applied thereon.
If instead of TODAY() you wish to specify some other date e.g. 10-01-2018 then in place of TODAY() Use DATE function specifying Year, Month, Day as parameters to it.
add a comment |
up vote
2
down vote
accepted
I assume that your dates are set to the format DD-MM-YYYY in your regional settings in the Operating System so that Excel shall understand 1-12-2018 as 1st Dec 2018.
You have an actual table in Excel not just a set or rows and columns.
First remove any formatting from the table. Set the color formatting as None.
Now select Cells A2:A3 go to Conditional Formatting -->New Rule --> Use a Formula to determine which cells to format option.
Now enter the formula.
=DATE(YEAR(A$1),MONTH(A$1),DAY(A$1))<TODAY()
Select the color format that you desire.
Click OK and exit. Now the rule shall be applied to cells A2:A3.
Use a format painter and apply it to all other cells from rest of the columns.
Since it's a Table, as you add rows to it the Conditional Formatting shall get auto applied thereon.
If instead of TODAY() you wish to specify some other date e.g. 10-01-2018 then in place of TODAY() Use DATE function specifying Year, Month, Day as parameters to it.
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
I assume that your dates are set to the format DD-MM-YYYY in your regional settings in the Operating System so that Excel shall understand 1-12-2018 as 1st Dec 2018.
You have an actual table in Excel not just a set or rows and columns.
First remove any formatting from the table. Set the color formatting as None.
Now select Cells A2:A3 go to Conditional Formatting -->New Rule --> Use a Formula to determine which cells to format option.
Now enter the formula.
=DATE(YEAR(A$1),MONTH(A$1),DAY(A$1))<TODAY()
Select the color format that you desire.
Click OK and exit. Now the rule shall be applied to cells A2:A3.
Use a format painter and apply it to all other cells from rest of the columns.
Since it's a Table, as you add rows to it the Conditional Formatting shall get auto applied thereon.
If instead of TODAY() you wish to specify some other date e.g. 10-01-2018 then in place of TODAY() Use DATE function specifying Year, Month, Day as parameters to it.
I assume that your dates are set to the format DD-MM-YYYY in your regional settings in the Operating System so that Excel shall understand 1-12-2018 as 1st Dec 2018.
You have an actual table in Excel not just a set or rows and columns.
First remove any formatting from the table. Set the color formatting as None.
Now select Cells A2:A3 go to Conditional Formatting -->New Rule --> Use a Formula to determine which cells to format option.
Now enter the formula.
=DATE(YEAR(A$1),MONTH(A$1),DAY(A$1))<TODAY()
Select the color format that you desire.
Click OK and exit. Now the rule shall be applied to cells A2:A3.
Use a format painter and apply it to all other cells from rest of the columns.
Since it's a Table, as you add rows to it the Conditional Formatting shall get auto applied thereon.
If instead of TODAY() you wish to specify some other date e.g. 10-01-2018 then in place of TODAY() Use DATE function specifying Year, Month, Day as parameters to it.
edited Nov 20 at 11:04
answered Nov 20 at 10:58
pat2015
3,0892721
3,0892721
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376899%2fhow-to-change-background-colour-of-column-based-upon-column-header-date%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown