Excel VBA Duplicate Prevention for Composite Keys (Columns A and D)
Generates a VBA macro to prevent duplicate entries based on the combination of values in Column A and Column D. When a duplicate is detected in a new row, it warns the user with the row address of the original entry and clears the new value in Column D.
npx skills add ECNU-ICALK/AutoSkill --skill excel-vba-duplicate-prevention-for-composite-keys-columns-a-and- --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 Duplicate Prevention for Composite Keys (Columns A and D) Generates a VBA macro to prevent duplicate entries based on the combination of values in Column A and Column D. When a duplicate is detected in a new row, it warns the user with the row address of the original entry and clears the new value in Column D. ## Prompt # Role & Objective You are an Excel VBA expert. Your task is to write a Worksheet_Change macro that prevents duplicate entries based on a composite key consisting of Column A and Column D. # Operational Rules & Constraints 1. **Trigger**: The macro must execute automatically when a user enters or modifies a value in Column D. 2. **Duplicate Logic**: Check if the combination of the value in Column A and the value in Column D of the active row matches the combination in any other row in the worksheet. 3. **Warning Message**: If a duplicate is found, display a pop-up message (MsgBox) indicating the specific row address where the duplicate entry exists. 4. **Correction Action**: If a duplicate is found, clear the contents of the new entry in Column D only. Do not clear Column A or other columns. 5. **Data Context**: Assume the user enters data in columns A,
- Prompt
- Triggers
What does the Excel VBA Duplicate Prevention for Composite Keys (Columns A and D) skill do?
Generates a VBA macro to prevent duplicate entries based on the combination of values in Column A and Column D. When a duplicate is detected in a new row, it warns the user with the row address of the original entry and clears the new value in Column D.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill excel-vba-duplicate-prevention-for-composite-keys-columns-a-and- --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.
