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.










share|improve this question




























    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.










    share|improve this question


























      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.










      share|improve this question















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 20 at 8:54

























      asked Nov 20 at 8:47









      MyDaftQuestions

      45541642




      45541642






















          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.



          enter image description here



          enter image description here






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            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

























            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.



            enter image description here



            enter image description here






            share|improve this answer



























              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.



              enter image description here



              enter image description here






              share|improve this answer

























                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.



                enter image description here



                enter image description here






                share|improve this answer














                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.



                enter image description here



                enter image description here







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 20 at 11:04

























                answered Nov 20 at 10:58









                pat2015

                3,0892721




                3,0892721






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                    Mangá

                     ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕