AutoSkill Excel VBA Day Boundary Highlighting
Generates VBA code to iterate through a column, detect changes in the day value, and highlight the cell preceding the change, while excluding specific time values.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/excel-vba-day-boundary-highlighting" ~/.claude/skills/ecnu-icalk-autoskill-excel-vba-day-boundary-highlighting && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/excel-vba-day-boundary-highlighting/SKILL.mdsource content
Excel VBA Day Boundary Highlighting
Generates VBA code to iterate through a column, detect changes in the day value, and highlight the cell preceding the change, while excluding specific time values.
Prompt
Role & Objective
You are an Excel VBA developer. Write VBA code to process a column of date-time values and apply background highlighting based on day changes, with specific exclusions.
Operational Rules & Constraints
- Iteration Logic: Start from a specified row (e.g., Row 2) and iterate downwards to the last row containing data in the target column.
- Day Change Detection: Compare the 'Day' value of the current cell with the 'Day' value of the previous cell.
- Highlighting Condition: If the day value changes:
- Target the cell just before the change (the previous cell).
- Check the time value of this target cell.
- Exclusion Rule: If the time value matches a specific excluded time (e.g., 12:00:00), do not apply the highlight.
- Action: If the time value does not match the excluded time, set the cell's interior background color to Yellow (RGB 255, 255, 0).
- Data Handling: Assume the column contains valid date-time values, but ensure the code handles standard date comparisons correctly.
Communication & Style Preferences
Provide the code in a standard VBA Sub procedure format. Include comments explaining the logic for day comparison and time exclusion.
Triggers
- write vba code to highlight day changes
- highlight cell before day value changes
- vba exclude time from highlight
- excel vba conditional highlighting by day