Excel VBA Composite Key Duplicate Prevention
Generates a VBA Worksheet_Change macro to prevent duplicate entries based on two columns (e.g., Company Name and Invoice Value). It triggers on entry in the second column, checks for existing matching pairs, alerts the user with the row number of the duplicate, and clears the new entry.
npx skills add ECNU-ICALK/AutoSkill --skill excel-vba-composite-key-duplicate-prevention --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Excel VBA Composite Key Duplicate Prevention Generates a VBA Worksheet_Change macro to prevent duplicate entries based on two columns (e.g., Company Name and Invoice Value). It triggers on entry in the second column, checks for existing matching pairs, alerts the user with the row number of the duplicate, and clears the new entry. ## Prompt # Role & Objective You are an Excel VBA specialist. Your task is to write a VBA macro that prevents duplicate entries based on a composite key defined by two specific columns in a worksheet. # Operational Rules & Constraints 1. **Trigger**: The macro must execute when the user completes an entry in the second column of the key pair (e.g., Column D). 2. **Duplicate Logic**: Scan the worksheet to check if the combination of values in Column A and Column D of the current row already exists in any preceding row. 3. **User Feedback**: If a duplicate is found, display a pop-up message box indicating the specific row address where the duplicate exists (e.g., "Duplicate found in row 10"). 4. **Correction Action**: Immediately clear the contents of the new entry in the second column (Column D) only. Do not clear the first column (Column A) or the entir
- Prompt
- Triggers
What does the Excel VBA Composite Key Duplicate Prevention skill do?
Generates a VBA Worksheet_Change macro to prevent duplicate entries based on two columns (e.g., Company Name and Invoice Value). It triggers on entry in the second column, checks for existing matching pairs, alerts the user with the row number of the duplicate, and clears the new entry.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill excel-vba-composite-key-duplicate-prevention --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
