[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KK9K4PV2C14ATV466C0MTZ":3,"skill-same:01M6KK9K4PV2C14ATV466C0MTZ":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":50,"install":51,"resources":64},"01M6KK9K4PV2C14ATV466C0MTZ","excel-lookup-formulas",null,"How to write INDEX&MATCH, VLOOKUP&MATCH, XLOOKUP, and similar two-condition lookup formulas in Excel using openpyxl. Use this skill whenever the user needs to populate data cells using lookup functions that match on two criteria (e.g., series code AND year), especially when pulling cross-sheet data with dynamic row\u002Fcolumn matching.","cxcscmu\u002FSkillLearnBench","cxcscmu","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142838272?v=4","01M6KCQDFQWPDSN0MKZY96MSQP","01M6KCQDM7G70TKJ28NTSQC0RZ",93,"MIT","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fb4-skill-creator-claude-sonnet-4-6\u002Fweighted-gdp-calculation\u002Fexcel-lookup-formulas\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"excel lookup formulas","formulas","lookup","xlsx","series","openpyxl","match","with","condition","how to","column","matching","sheet","functions","use","write","how","data","index","code","2026-11-10 10:12:30",false,"---\nname: excel-lookup-formulas\ndescription: How to write INDEX&MATCH, VLOOKUP&MATCH, XLOOKUP, and similar two-condition lookup formulas in Excel using openpyxl. Use this skill whenever the user needs to populate data cells using lookup functions that match on two criteria (e.g., series code AND year), especially when pulling cross-sheet data with dynamic row\u002Fcolumn matching.\n---\n\n# Excel Two-Condition Lookup Formulas\n\n## Overview\n\nWhen populating a data table from a source sheet using two lookup conditions (e.g., a row identifier like series code AND a column identifier like year), use INDEX&MATCH with two MATCH calls.\n\n## Standard Pattern: INDEX&MATCH with Two Conditions\n\n```excel\n=INDEX(Data!$H$21:$M$40, MATCH($D12, Data!$B$21:$B$40, 0), MATCH(H$9, Data!$H$4:$M$4, 0))\n```\n\n**How it works:**\n- `INDEX(range, row_num, col_num)` — returns value at intersection\n- First `MATCH` finds the row: matches series code from Task column D against Data column B\n- Second `MATCH` finds the column: matches year from Task row 9 against Data row 4 headers\n- `$D12` — dollar-locks the column (D), leaves row relative so it moves down when copied\n- `H$9` — dollar-locks the row (9), leaves column relative so it moves right when copied\n\n## Absolute vs Relative References\n\n| Reference | Behavior when copied |\n|-----------|---------------------|\n| `$D$12` | Never moves |\n| `$D12` | Column locked, row moves down |\n| `H$9` | Row locked, column moves right |\n| `H12` | Both move |\n\n- Use `$D12` for the row lookup key (series code in column D) — column stays, row varies\n- Use `H$9` for the column lookup key (year in row 9) — row stays, column varies\n- Use `$` on both dimensions for the lookup arrays (source ranges)\n\n## Data Sheet References\n\nWhen the source data has:\n- **Row headers** (series codes) in column B, rows 21–40 → `Data!$B$21:$B$40`\n- **Column headers** (years) in row 4, columns H–M → `Data!$H$4:$M$4`\n- **Data values** in the body → `Data!$H$21:$M$40`\n\nThe year headers in the source (Data sheet row 4) may include one extra year (e.g., 2018) not present in the Task sheet, so MATCH correctly selects the right column.\n\n## Writing Formulas with openpyxl\n\n```python\nfrom openpyxl import load_workbook\n\nwb = load_workbook('file.xlsx')\ntask = wb['Task']\n\n# Fill a block of cells with the same formula pattern\nfor row in range(12, 18):   # rows 12–17\n    for col in range(8, 13):  # columns H–L (8–12)\n        col_letter = task.cell(row=row, column=col).column_letter\n        formula = f'=INDEX(Data!$H$21:$M$40,MATCH($D{row},Data!$B$21:$B$40,0),MATCH({col_letter}$9,Data!$H$4:$M$4,0))'\n        task.cell(row=row, column=col).value = formula\n\nwb.save('file.xlsx')\n```\n\n## Key Rules\n\n1. Always verify which row\u002Fcolumn has the lookup keys before writing formulas\n2. Use `load_workbook` without `data_only=True` to preserve existing formulas\n3. Use `keep_vba=False` (default) unless macros must be preserved\n4. After saving, run `recalc.py` to evaluate formulas and check for errors\n5. Never hardcode computed values — always write Excel formulas\n","# Excel Two-Condition Lookup Formulas\n\n## Overview\n\nWhen populating a data table from a source sheet using two lookup conditions (e.g., a row identifier like series code AND a column identifier like year), use INDEX&MATCH with two MATCH calls.\n\n## Standard Pattern: INDEX&MATCH with Two Conditions\n\n```excel\n=INDEX(Data!$H$21:$M$40, MATCH($D12, Data!$B$21:$B$40, 0), MATCH(H$9, Data!$H$4:$M$4, 0))\n```\n\n**How it works:**\n- `INDEX(range, row_num, col_num)` — returns value at intersection\n- First `MATCH` finds the row: matches series code from Task column D against Data column B\n- Second `MATCH` finds the column: matches year from Task row 9 against Data row 4 headers\n- `$D12` — dollar-locks the column (D), leaves row relative so it moves down when copied\n- `H$9` — dollar-locks the row (9), leaves column relative so it moves right when copied\n\n## Absolute vs Relative References\n\n| Reference | Behavior when copied |\n|-----------|---------------------|\n| `$D$12` | Never moves |\n| `$D12` | Column locked, row moves down |\n| `H$9` | Row locked, column moves right |\n| `H12` | Both move |\n\n- Use `$D12` for the row lookup key (series code in column D) — column stays, row varies\n- Use `H$9` for the column lookup key (year in row 9) — row stays, column varies\n- Use `$` on both dimensions for the lookup arrays (source ranges)\n\n## Data Sheet References\n\nWhen the source data has:\n- **Row headers** (series codes) in column B, rows 21–40 → `Data!$B$21:$B$40`\n- **Column headers** (years) in row 4, columns H–M → `Data!$H$4:$M$4`\n- **Data values** in the body → `Data!$H$21:$M$40`\n\nThe year headers in the source (Data sheet row 4) may include one extra year (e.g., 2018) not present in the Task sheet, so MATCH correctly selects the right column.\n\n## Writing Formulas with openpyxl\n\n```python\nfrom openpyxl import load_workbook\n\nwb = load_workbook('file.xlsx')\ntask = wb['Task']\n\n# Fill a block of cells with the same formula pattern\nfor row in range(12, 18):   # rows 12–17\n    for col in range(8, 13):  # columns H–L (8–12)\n        col_letter = task.cell(row=row, column=col).column_letter\n        formula = f'=INDEX(Data!$H$21:$M$40,MATCH($D{row},Data!$B$21:$B$40,0),MATCH({col_letter}$9,Data!$H$4:$M$4,0))'\n        task.cell(row=row, column=col).value = formula\n\nwb.save('file.xlsx')\n```\n\n## Key Rules\n\n1. Always verify which row\u002Fcolumn has the lookup keys before writing formulas\n2. Use `load_workbook` without `data_only=True` to preserve existing formulas\n3. Use `keep_vba=False` (default) unless macros must be preserved\n4. After saving, run `recalc.py` to evaluate formulas and check for errors\n5. Never hardcode computed values — always write Excel formulas\n",{"name":5,"description":7},"main","726e1f79b96b0cb3d729d0e55a1c847e0b5353ae","skills\u002Fb4-skill-creator-claude-sonnet-4-6\u002Fweighted-gdp-calculation\u002Fexcel-lookup-formulas",8,"https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench","https:\u002F\u002Fcxcscmu.github.io\u002FSkillLearnBench","https:\u002F\u002Fgithub.com\u002Fcxcscmu","2026-10-02 22:55:36",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add cxcscmu\u002FSkillLearnBench --skill excel-lookup-formulas",{"tool":57,"command":58},"bunx","bunx skills add cxcscmu\u002FSkillLearnBench --skill excel-lookup-formulas",{"tool":60,"command":61},"pnpm","pnpm dlx skills add cxcscmu\u002FSkillLearnBench --skill excel-lookup-formulas","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fb4-skill-creator-claude-sonnet-4-6\u002Fweighted-gdp-calculation\u002Fexcel-lookup-formulas\u002FSKILL.md",true,[],[66,79,101,119,138,149],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":38},"01M6KM5KH175P5ABP5JMX2SBDQ","object_counter","Count occurrences of an object in the image using computer vision algorithm.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Fvideo-object-counting\u002Fobject_counter\u002FSKILL.md",[],[73,74,75,76,77,78],"object counter","object","vision","computer","Computer Vision","image",{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":38},"01M6KM51TMVXG79MMPCS6Y8G86","travel-planning-workflow","Invoke this skill when performing travel planning. It defines a structured workflow for generating itineraries. Following this workflow is essential to ensure the final plan satisfies user requirements.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftravel-planning\u002Ftravel-planning-workflow\u002FSKILL.md",[],[86,87,88,89,90,91,92,93,94,95,96,97,98,99,100],"workflow","planning","planning workflow","travel","travel planning","travel planning workflow","structured","performing","plan","for","user","it","requirements","essential","itineraries",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":38},"01M6KM4DY820XHS9YTSK5QP5HD","bundled-dataset-search-tool","invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftravel-planning\u002Fbundled-dataset-search-tool\u002FSKILL.md",[],[108,109,110,111,112,113,114,89,115,116,90,117,95,118,87],"search","tool","dataset","bundled dataset search tool","restaurants","Tools","up","look","flights","you","database",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":38},"01M6KM465BB9PQ0B548HQSVAWZ","glm-output","Output-processing guidance for GLM tasks. Especially useful after glm-basics and glm-calibration when you need verifier-matching metrics from output.nc and a final \u002Froot\u002Fmetrics.json.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-output\u002FSKILL.md",[],[126,127,128,95,129,130,131,132,133,29,134,135,117,136,137],"glm output","output","glm","tasks","metrics","json","basics","guidance","verifier","processing","root","calibration",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":38},"01M6KM40KY3QWDW5W97S39R2BC","glm-calibration","Calibration guidance for GLM tasks. Often most effective after glm-basics has clarified the setup; glm-output is the companion skill for exact final metric computation.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-calibration\u002FSKILL.md",[],[145,137,128,127,133,132,129,146,147,95,148],"glm calibration","setup","companion","metric",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":38},"01M6KM3VHHVSGMGHJQB3PPT6YG","glm-basics","A good starting point for GLM calibration tasks. Use to inspect glm3.nml, confirm how GLM runs, and identify the relevant files before moving on to calibration and output evaluation.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-basics\u002FSKILL.md",[],[156,128,132,157,145,137,95,127,158,159,160,32,34,161,129],"glm basics","inspect","relevant","files","good","Evaluation"]