hydr0pon1c/skills-on-the-fly/1925

Claude Code and agent skill by hydr0pon1c/skills-on-the-fly

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install hydr0pon1c/skills-on-the-fly/1925

SKILL.md

The same SKILL.md was published earlier as hydr0pon1c/skills-on-the-fly/1925.

SKILL.md

When to use

This skill applies when an Excel formula with INDEX/MATCH (or similar lookup functions) uses a hardcoded column reference (e.g., Sheet2!F:F) but the lookup column should vary dynamically based on a matching header value (e.g., a date in a source cell matched against a row of headers in another sheet). The task typically involves:

  • A source sheet with a reference value (e.g., date, ID) in a specific cell.
  • A data sheet where the matching column is determined by locating that reference value in a header row.
  • Then performing a lookup (e.g., match items from one column) inside the dynamically determined column.
  • A fallback value when the item is not found (often "New" or blank).

Before acting, gather these pieces of evidence from the spreadsheet:

  • The exact location of the reference value (cell reference, e.g., Sheet1!C5).
  • The header row in the data sheet (e.g., Sheet2!5:5) that contains the values to match against the reference.
  • The columns/rows containing items to be looked up (e.g., Sheet1!B6:B31).
  • The range that must be filled with the result (the answer position).
  • The original formula and its explicit mistake.

Possible Failure Modes

  • Hardcoded column instead of dynamic: The original formula uses a fixed column (e.g., F:F) but the correct column depends on a date match. Simply using INDEX(Sheet2!F:F, ...) will fail for all days except the one that happens to be in column F.
  • Incorrect header row identification: Mistaking which row holds the headers for column matching (e.g., using row 1 when row 5 is the date row, or vice versa). Always verify the actual row that contains date values in the data sheet.
  • Off‑by‑one in row indexing: The header row often includes a label in the first column (e.g., "Items" in A5). Ensure MATCH is performed on the correct row range, excluding label cells if needed.
  • Date format mismatch: The reference cell might contain a date-time object while headers are text or different format. Use MATCH with exact match (0) and convert to same type if necessary.
  • Missing fallback handling: The original formula may use IFNA for “New”, but the new dynamic formula might need IFERROR or IFNA wrapped around the whole expression.
  • Ignoring absolute references: When writing the formula into a range, relative row/column references must be correct so that dragging the formula works (e.g., row lock for lookup value, absolute reference for header range).
  • Applying the formula only to the first cell instead of the entire answer range: Answer positions like 'Sheet1'!C6:C31 require the formula in all those cells.

Possible procedures

  1. Map the sheets:
  • Source sheet: identify the cell holding the reference (e.g., Sheet1!C5).
  • Data sheet: identify the row containing the matching headers (e.g., Sheet2!$5:$5). Note that this row may have a label in the first column (e.g., "Items" in A5). In that case, use a range starting from column B or explicitly exclude A5.
  • Identify the column in the source sheet that contains the lookup items (e.g., Sheet1!B:B).
  • Identify the answer range (e.g., Sheet1!C6:C31).
  1. Design the dynamic column lookup:
  • Use MATCH(reference, header_row_range, 0) to find the column number of the matched header.
  • That column number becomes the second argument of INDEX(entire_data_range, row_lookup).
  • If headers span multiple columns, set the INDEX range from the first possible data column (e.g., Sheet2!$A:$Z).
  1. Build the item lookup inside the correct column:
  • Use MATCH(item_cell, INDEX(data_range, 0, col_number), 0) to get the row number within that column.
  • Nest this inside INDEX(data_range, row_number, col_number) to retrieve the value.
  • Wrap with IFERROR or IFNA to return "New" when no match is found.

Example pattern (adjust ranges to actual sheet): `` =IFERROR(INDEX(Sheet2!$A$1:$Z$100, MATCH(Sheet1!B6, INDEX(Sheet2!$A$1:$Z$100, 0, MATCH(Sheet1!$C$5, Sheet2!$5:$5, 0)), 0), MATCH(Sheet1!$C$5, Sheet2!$5:$5, 0)), "New") ` Note: The innermost MATCH returns the column number; the outer MATCH looks up the item within that entire column; the outermost INDEX` returns the value at the intersection.

  1. Enter the formula in the answer range (e.g., C6:C31):
  • If writing with Python/openpyxl, use a loop to assign the formula to each cell, adjusting relative references (e.g., B6 should become B7, B8, ...).
  • Lock absolute references for the header row and the reference cell (e.g., $C$5, $5:$5).
  • Ensure the answer range exactly matches the specified position; do not modify cells outside it.
  1. Verify the formula’s logic:
  • Test with the first few cells manually (or via code) to ensure dynamic column selection produces correct values.
  • Check that MATCH with 0 actually finds an exact match; if the reference date is missing, MATCH returns #N/A, which triggers the fallback. That is correct.

Verification Checklist

  • [ ] The formula is written only into cells specified by answer_position. No data outside that range is modified.
  • [ ] The reference cell (e.g., C5) is used exactly once in a MATCH against the correct header row in the data sheet.
  • [ ] The header row range is absolute (e.g., $5:$5) so it does not shift when the formula is filled down.
  • [ ] The lookup column is not hardcoded; it is derived from the MATCH on the reference.
  • [ ] The item lookup (MATCH on the source item) is performed inside that dynamic column (using INDEX(…, 0, col_num)).
  • [ ] The formula returns a value when the item exists in the matched column, and "New" when it does not (or "" if specified otherwise).
  • [ ] For all rows in the answer range, the formula produces a result (not an error) – i.e., properly handles missing items.
  • [ ] The fallback value matches the instruction (e.g., "New", blank, etc.).
  • [ ] No retrieved example’s concrete names, dates, or numbers appear in the final formula; the skill is applied to the target’s actual sheet.
  • [ ] The workbook is saved to the specified output_path without errors.
  • [ ] After saving, a quick sanity check (e.g., print first few resulting values) confirms the dynamic column selection is working.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/hydr0pon1c/skills-on-the-fly/1925/badge)](https://verified-skill.com/skills/hydr0pon1c/skills-on-the-fly/1925)

Something wrong with this skill or its page? Tell us.