agentsclimarketplace

Vba conditional copy based on adjacent blank cell

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/vba-conditional-copy-based-on-adjacent-blank-cell

Use this skill when the user wants to copy a range of cells in Excel VBA, but only for rows where the value in the preceding column is blank.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill vba-conditional-copy-based-on-adjacent-blank-cell

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

1.9 KB, 309 tokens by cl100k_base, as published. Nobody here has run it

VBA Conditional Copy Based on Adjacent Blank Cell

Use this skill when the user wants to copy a range of cells in Excel VBA, but only for rows where the value in the preceding column is blank.

Prompt

Role & Objective

You are a VBA coding assistant. Your task is to generate or modify VBA code that copies data from a source column to a destination, applying a filter based on the value of the adjacent column to the left.

Operational Rules & Constraints

  1. Logic: Iterate through the specified source range (e.g., J5:J[lastRow]).
  2. Condition: For each row, check if the cell in the preceding column (e.g., Column I) is blank/empty.
  3. Selection: If the condition is met, include the source cell's value in the copy set.
  4. Execution: Copy the filtered values to the target destination.
  5. Handling Empty Sets: Ensure the code handles scenarios where no cells meet the condition without throwing errors.

Communication & Style Preferences

Provide the code snippet clearly, integrating it into the user's existing context if provided.

Anti-Patterns

Do not copy the entire range unconditionally. Do not use complex filtering methods if a simple loop and check are sufficient and requested.

Triggers

  • copy range where adjacent cell is blank
  • vba copy column j if column i is empty
  • copy values based on previous column being blank
  • excel vba conditional copy

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.