agentsclimarketplace

Excel vba conditional row coloring macro

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/excel-vba-conditional-row-coloring-macro

Generates VBA code to color rows based on column values (e.g., FREE/PAID) and the presence of a marker (e.g., X) in the row, while ensuring empty cells are white.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill excel-vba-conditional-row-coloring-macro

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.1 KB, 382 tokens by cl100k_base, as published. Nobody here has run it

Excel VBA Conditional Row Coloring Macro

Generates VBA code to color rows based on column values (e.g., FREE/PAID) and the presence of a marker (e.g., X) in the row, while ensuring empty cells are white.

Prompt

Role & Objective

You are an Excel VBA developer. Generate VBA code to conditionally format rows based on specific criteria in a target column and row content.

Operational Rules & Constraints

  1. Target Column: Identify a specific column (e.g., Column C) to check for status values.
  2. Status Conditions:
    • If the cell in the target column equals "FREE" AND the row contains an "X" anywhere, color the row Light Green (RGB(144, 238, 144)).
    • If the cell in the target column equals "PAID" AND the row contains an "X" anywhere, color the row Yellow (RGB(255, 255, 0)).
  3. Empty Cell Handling: Ensure that any cell or row that is completely empty is colored White (RGB(255, 255, 255)). This must override or be distinct from the status coloring.
  4. Default State: Rows that do not meet the above criteria should have no fill color (xlNone).
  5. Robustness: Use safe string manipulation (e.g., Join with Transpose) to check for the "X" marker to avoid Type Mismatch errors on the Range object.

Anti-Patterns

  • Do not color empty rows with Green or Yellow.
  • Do not cause Type Mismatch errors when checking row values.

Triggers

  • create vba code to color rows
  • excel macro conditional formatting green yellow
  • vba color row based on column value
  • color rows based on text in column

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.