How to Move Excel Table Data and Colors with Changing Dates
Question details
The user wants to keep spreadsheet data and fill colors aligned when dates change, specifically aiming to automatically shift data and clear the current week while preserving formatting.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Updating weekly schedules or date-based tracking tables where cell colors and data correspond to specific dates or weeks.
- Observed behavior
- When dates are updated manually, the manually applied cell fill colors and associated data do not automatically shift to align with the new dates.
Before altering your table structure or applying new conditional formatting rules, save a copy of your workbook to ensure you do not lose your currently applied manual color formats.
Use Conditional Formatting for Automatic Color Shifting
Apply conditional formatting rules so that cell colors automatically update based on the date value, removing the need to shift manual fill colors.
Manual formatting is tied to the specific cell, not the date value inside it. By replacing manual fill colors with conditional formatting, the colors will dynamically highlight the correct cells whenever you change the dates in your header row.
Highlight the entire table range where you want the colors to appear dynamically based on the dates.
Navigate to the 'Home' tab on the ribbon and click on 'Conditional Formatting', then select 'New Rule'.
Choose 'Use a formula to determine which cells to format'. Enter a formula that references your date header (e.g., =B$1<=TODAY()).
Click the 'Format' button, go to the 'Fill' tab, select your desired color, and click 'OK' to apply the dynamic formatting.

Insert New Columns to Shift Manual Formatting
If you prefer to keep manual fill colors, you can shift your data and formats by manually inserting new columns for the current week.
Restructure Your Data Vertically
Instead of shifting columns horizontally across a timeline, restructure your table vertically so that each row represents a date.
Automate Date Formatting Easily with WPS Spreadsheet
Handling dynamic schedules and color shifting is simple in WPS Spreadsheet. Utilizing its advanced conditional formatting tools allows you to perfectly align dates, colors, and data without manual column adjustments.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your existing date-tracking workbook.
- 2. Select the tracking area: Highlight the grid of cells where you want the colors to shift alongside the dates.
- 3. Access Conditional Formatting: Go to the 'Home' tab on the top ribbon and select 'Conditional Formatting'.
- 4. Create a date rule: Click 'New Rule', select the formula option, and input a logic statement tying the cell to your date row.
- 5. Save and automate: Choose your fill color and click 'OK'. The spreadsheet will now automatically shift colors when the date headers change.

Frequently Asked Questions
Why don't my manual fill colors move when I change the dates?
Manual formatting in spreadsheet software is anchored to the specific cell (e.g., cell C4), not the data or the date value within it. When you type a new date into the header, the cell underneath retains its original manual background color unless you physically move the cell or use conditional formatting.
Can I use a VBA macro to shift data automatically?
Yes, if you rely heavily on manual coloring, you can write a VBA macro. A macro can be programmed to detect when the current week changes and automatically copy, shift, and clear specific cell ranges. However, this requires programming knowledge and saving the file in a macro-enabled format.
How do I hide previous weeks in my tracker instead of shifting them?
If you want to keep historical data intact without shifting everything, you can simply hide the past weeks. Select the column headers containing the past dates, right-click, and choose 'Hide'. This will visually bring the current week to the front while preserving all past data and manual colors.




