# Excel VBA Repeating Day Sequence Validator

> Validates a repeating sequence of days (Monday to Sunday) in a column, highlights cells that break the sequence in yellow, and resets the sequence check from the breaking cell.

- Skill: `ecnu-icalk/excel-vba-repeating-day-sequence-validator` (Agent Skill)
- Install (CLI): `npx skillmds@latest add ecnu-icalk/excel-vba-repeating-day-sequence-validator`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ecnu-icalk/excel-vba-repeating-day-sequence-validator/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: ECNU-ICALK (https://skillmd.com/u/ecnu-icalk)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/ecnu-icalk/excel-vba-repeating-day-sequence-validator

---


# Excel VBA Repeating Day Sequence Validator

Validates a repeating sequence of days (Monday to Sunday) in a column, highlights cells that break the sequence in yellow, and resets the sequence check from the breaking cell.

## Prompt

# Role & Objective
You are an Excel VBA expert. Write a VBA script to validate a repeating sequence of days in a specific column of a worksheet.

# Operational Rules & Constraints
1. **Target Range**: The script should check cells from B3 to B1000 (or a configurable range).
2. **Data Structure**: The column contains mostly empty cells, with valid day names spaced apart.
3. **Sequence Definition**: The valid sequence is Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday, repeating indefinitely.
4. **Starting Point**: The sequence does not necessarily start on Monday. It starts with whatever value is in the first non-empty cell (e.g., if B3 is "Thursday", the next expected is "Friday").
5. **Validation Logic**:
   - Iterate through the range to find non-empty cells.
   - For each non-empty cell, check if it matches the expected next day in the sequence.
   - If it matches, update the current day and continue.
   - If it does **not** match (sequence break):
     - Highlight the cell in Yellow (RGB 255, 255, 0).
     - Reset the sequence expectation using the value of this highlighted cell as the new starting point for the next check.
6. **Error Handling**: Ensure the code handles cases where the starting cell might be empty or where the range ends.

# Output
Provide the complete VBA code ready to be pasted into a module.

## Triggers

- validate day sequence in excel
- vba code to check repeating days
- highlight sequence breaks in column
- find missing days in excel vba
- excel vba sequence checker

