{"slug": "experimenting-with-skills-for-copilot-for-excel", "title": "Experimenting with skills for Copilot For Excel", "summary": "Microsoft has developed a new skill for Copilot for Excel that automates the creation of structured LAMBDA functions following 5th Generation Modeling standards. The skill guides users through an eight-step workflow to convert formulas into documented, reusable LAMBDA functions with inline help, parameter handling, and automatic testing. This integration brings professional-grade function development practices directly into Excel's AI assistant.", "body_md": "| # 5G LAMBDA Template Skill | |\n| # Version: 1.4 | |\n| # Last Updated: May-20-2026 | |\n| skill: | |\n| name: lambda-template-5g | |\n| description: > | |\n| Rules and conventions for creating well-structured Excel LAMBDA functions | |\n| with inline help documentation using the Advanced Formula Environment (AFE). | |\n| Follows 5th Generation Modeling standards from 5gmodelling.com. | |\n| category: Excel | |\n| tags: | |\n| - LAMBDA | |\n| - AFE | |\n| - Excel Labs | |\n| - Named Functions | |\n| - Documentation | |\n| - 5G Modeling | |\n| # ═══════════════════════════════════════════════════════════════════════════ | |\n| # TRIGGER PHRASES | |\n| # ═══════════════════════════════════════════════════════════════════════════ | |\n| triggers: | |\n| - \"Make 5g\" | |\n| - \"Make LAMBDA\" | |\n| - \"Convert to 5g\" | |\n| - \"Convert to LAMBDA\" | |\n| # ═══════════════════════════════════════════════════════════════════════════ | |\n| # WORKFLOW | |\n| # ═══════════════════════════════════════════════════════════════════════════ | |\n| workflow: | |\n| description: > | |\n| Step-by-step process to convert a formula into a 5G LAMBDA function. | |\n| Do not scan the workbook before taking step 1. | |\n| steps: | |\n| - step: 1 | |\n| action: Ask for user's name | |\n| prompt: \"What name shall I use for version control?\" | |\n| usage: Used in REVISIONS section and VERSION line | |\n| - step: 2 | |\n| action: Ask for formula | |\n| prompt: \"Select formulas to convert into a 5G LAMBDA function.\" | |\n| usage: Identifies parameters and core logic | |\n| - step: 3 | |\n| action: Display parameters and ask if any are optional | |\n| prompt: \"Are any of these inputs optional? If yes, which ones and what is each optional parameter's default value?\" | |\n| usage: Determines bracket conventions and default value logic | |\n| - step: 4 | |\n| action: Display suggested function names and ask for function name | |\n| prompt: \"What would you like to name this function? (e.g., MonthlyPaymentλ)\" | |\n| usage: Used throughout the LAMBDA definition and help text | |\n| - step: 5 | |\n| action: Add to names collection | |\n| description: Add the 5G LAMBDA function to the workbook's names collection | |\n| - step: 6 | |\n| action: Test the function | |\n| description: Find an empty space below the original example and run the 5g function with the same inputs as the original example. | |\n| Leave the test results for the user to examine. Do not clean them up. | |\n| - step: 7 | |\n| action: Compare results | |\n| description: Compare the 5G function's output to the original example to verify correctness | |\n| - step: 8 | |\n| action: Display Source | |\n| description: Write the fully commented source to the chat window. Use TEMPLATE STRUCTURE as a guide. | |\n| # ═══════════════════════════════════════════════════════════════════════════ | |\n| # RULES | |\n| # ═══════════════════════════════════════════════════════════════════════════ | |\n| rules: | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 1. PLACEHOLDER BRACKETS | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| placeholder_brackets: | |\n| description: > | |\n| Template placeholders like <description> are instructional only. | |\n| Remove the angle brackets (<>) in the generated output. | |\n| example: | |\n| template: \"<Calculates the monthly payment>\" | |\n| output: \"Calculates the monthly payment\" | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 2. USER NAME | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| user_name: | |\n| description: > | |\n| Always ask for the user's name at the start of the workflow. | |\n| Use it in the REVISIONS section and VERSION line. | |\n| prompt: \"What is your name?\" | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 3. DATE HANDLING | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| date_handling: | |\n| description: > | |\n| Use the current date for the REVISIONS section and VERSION line. | |\n| format: \"Mmm-dd-yyyy\" | |\n| example: \"May-15-2026\" | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 4. OPTIONAL PARAMETERS | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| optional_parameters: | |\n| description: > | |\n| Ask if any inputs are optional. If yes, ask which ones and | |\n| what each optional parameter's default value is. | |\n| prompt: \"Are any of these inputs optional? If yes, which ones and what is each optional parameter's default value?\" | |\n| handling: | |\n| lambda_definition: \"All arguments use [brackets]\" | |\n| help_text_function_line: | |\n| required: \"NO brackets (e.g., Amount)\" | |\n| optional: \"WITH brackets (e.g., [Term])\" | |\n| help_text_parameters: | |\n| required: \"(Required) description\" | |\n| optional: \"(Optional) Default: value. description\" | |\n| let_section: > | |\n| Add default value assignment for optional params: | |\n| ParamName, IF(ISOMITTED(ParamName), DefaultValue, ParamName), | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 5. ARGUMENT BRACKETS CONVENTION | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| argument_brackets: | |\n| description: > | |\n| All arguments must appear optional to Excel so help text can display | |\n| when required arguments are omitted. The help text signals which are | |\n| truly required by omitting brackets. | |\n| lambda_definition: | |\n| required: \"[Argument]\" | |\n| optional: \"[Argument]\" | |\n| help_text_function_line: | |\n| required: \"ARGUMENT\" | |\n| optional: \"[Argument]\" | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 6. TEXTSPLIT DELIMITERS | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| textsplit_delimiters: | |\n| description: > | |\n| TEXTSPLIT creates a formatted help table that displays | |\n| in the Excel grid when required arguments are omitted. | |\n| syntax: 'TEXTSPLIT( text, \"→\", \"¶\" )' | |\n| delimiters: | |\n| column: \"→\" | |\n| row: \"¶\" | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 7. MULTI-ROW PARAMETER DESCRIPTIONS | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| multi_row_descriptions: | |\n| description: > | |\n| When a parameter description needs multiple rows in the grid display, | |\n| use a leading \"→\" on continuation lines for proper column alignment. | |\n| example: | | |\n| \" PositiveOnly? →(Optional) TRUE: Outflows are entered as positive values ¶\" & | |\n| \"→ that this function will subtract from the opening balance. ¶\" & | |\n| \"→ FALSE: Outflows are entered as negative values. Default is FALSE.\" | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 8. LET STEP RESULTS | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| let_step_results: | |\n| description: > | |\n| Name the last calculation in the LET Function. | |\n| Use that name as the last step in the LET function. | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 9. EXCEL SYNTAX RULES | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| excel_syntax: | |\n| description: > | |\n| Follow standard Excel conventions for function names and booleans. | |\n| booleans: \"Uppercase: FALSE, TRUE\" | |\n| function_names: \"Uppercase: AVERAGE(), INDEX(), SCAN(), REDUCE(), PMT()\" | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 10. STRING CONCATENATION | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| string_concatenation: | |\n| description: > | |\n| Ensure all help text lines are properly concatenated with the & operator. | |\n| rule: \"Every line except the last must end with &\" | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 11. INDEX BEHAVIOR | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| index_behavior: | |\n| description: > | |\n| When working with single-row arrays, INDEX interprets the second | |\n| argument as the column number. | |\n| rule: \"When array is a single row, INDEX(array, n) returns the nth column value\" | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 12. MULTIPLE FORMULAS | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| multiple_formulas: | |\n| description: > | |\n| When the user selects multiple cells containing formulas, | |\n| include all of them in the LAMBDA function. | |\n| handling: | |\n| - Identify all formulas in the selected range | |\n| - Combine them logically within a single LAMBDA | |\n| - Create appropriate parameters for all unique inputs across formulas | |\n| - Document each formula's purpose in the help text | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 13. INPUT CELL DETECTION | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| input_cell_detection: | |\n| description: > | |\n| When formulas reference cells outside the selected range, determine | |\n| which cells become LAMBDA inputs based on their content. | |\n| rules: | |\n| - If a referenced cell contains a value (not a formula), it becomes an input | |\n| - If a referenced cell contains a formula that only references another cell | |\n| (passthrough), follow the reference chain to find the true input | |\n| - If a referenced cell contains a formula with calculations, that cell | |\n| itself becomes an input | |\n| example: | |\n| scenario: \"Selected formula references B5, and B5 contains =C3\" | |\n| result: \"C3 becomes the input, not B5 (B5 is a passthrough)\" | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 14. HORIZONTAL SEQUENCE FOR SCAN | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| horizontal_sequence_scan: | |\n| description: > | |\n| When using SCAN to build a horizontal array, use SEQUENCE(1, n) | |\n| instead of SEQUENCE(n) to avoid needing TRANSPOSE afterward. | |\n| rule: \"SEQUENCE(1, Term) produces horizontal output directly from SCAN\" | |\n| example: | |\n| inefficient: | | |\n| CloseBal, SCAN(Amount, SEQUENCE(Term), LAMBDA(bal, n, formula)), | |\n| CloseRow, TRANSPOSE(CloseBal), | |\n| elegant: | | |\n| CloseBal, SCAN(Amount, SEQUENCE(1, Term), LAMBDA(bal, n, formula)), | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 15. DROP VS TAKE FOR ARRAY SLICING | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| drop_vs_take: | |\n| description: > | |\n| When removing elements from the end of an array, prefer DROP over TAKE | |\n| to avoid referencing array length variables. | |\n| rule: \"Use DROP(array, , -1) instead of TAKE(array, 1, Length-1)\" | |\n| example: | |\n| inefficient: \"OpenBal, HSTACK(Amount, TAKE(CloseBal, 1, Term-1))\" | |\n| elegant: \"OpenBal, HSTACK(Amount, DROP(CloseBal, , -1))\" | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 16. FIXED RANGE ARGUMENTS | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| fixed_range_arguments: | |\n| description: > | |\n| Convert arguments that cover multiple columns to arrays | |\n| rule: \"Determine which argument sets the number of columns (columns) in the result. | |\n| Expand multi-cell, fixed range arguments (argument) using EXPAND( argument, 1, columns, 0).\" | |\n| purpose: \"Makes sure argument sizes remain dynamic ad agree with other array sizes.\" | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| # 17. MATCH EXAMPLE OUTPUT | |\n| # ───────────────────────────────────────────────────────────────────────── | |\n| match_example_output: | |\n| description: > | |\n| match the function's output to the example's output | |\n| rule: \"Include in the function's output all selected formula rows. Copy formats from the example to the output.\" | |\n| purpose: \"Keep the users desired output.\" | |\n| # ═══════════════════════════════════════════════════════════════════════════ | |\n| # TEMPLATE STRUCTURE | |\n| # ═══════════════════════════════════════════════════════════════════════════ | |\n| template: | |\n| description: > | |\n| Standard structure for 5G LAMBDA functions with inline documentation. | |\n| code: | | |\n| /* FUNCTION NAME: Functionλ | |\n| DESCRIPTION:*//**Description of what the function does*/ | |\n| /* REVISIONS: Date Developer Description | |\n| Mmm dd yyyy UserName Copyright/Initial Release | |\n| */ | |\n| Functionλ = LAMBDA( | |\n| // Function Arguments | |\n| [Required1], // Description | |\n| [Required2], // Description | |\n| [Optional1], // Description (default: value) | |\n| // Check required arguments | |\n| IF( OR( ISOMITTED(Required1), | |\n| ISOMITTED(Required2) | |\n| ), | |\n| // Display inline help text | |\n| TRIM(TEXTSPLIT( | |\n| \"FUNCTION: →Functionλ( Required1, Required2, [Optional1])¶\" & | |\n| \"DESCRIPTION: →Description of what the function does¶\" & | |\n| \"WEBPAGE: →https://5gmodelling.com¶\" & | |\n| \"VERSION: →UserName, Mmm-dd-yyyy¶\" & | |\n| \"PARAMETERS: →¶\" & | |\n| \" Required1 →(Required) Description¶\" & | |\n| \" Required2 →(Required) Description¶\" & | |\n| \" Optional1 →(Optional) Default: value. Description\", | |\n| \"→\", \"¶\")), | |\n| // Main function logic | |\n| LET( | |\n| // Set Defaults | |\n| Optional1, IF(ISOMITTED(Optional1), DefaultValue, Optional1), | |\n| // Calculations | |\n| Result, formula, | |\n| Result | |\n| ) | |\n| ) | |\n| ); | |\n| # ═══════════════════════════════════════════════════════════════════════════ | |\n| # CHECKLIST | |\n| # ═══════════════════════════════════════════════════════════════════════════ | |\n| checklist: | |\n| - \"Function name matches throughout (definition, help text FUNCTION line)\" | |\n| - \"All brackets correct in LAMBDA definition [Argument]\" | |\n| - \"Help text FUNCTION line: required args NO brackets, optional args WITH brackets\" | |\n| - \"All & concatenation operators present between help text lines\" | |\n| - \"TEXTSPLIT delimiters correct: \\\"→\\\", \\\"¶\\\" (column, row)\" | |\n| - \"All parentheses balanced (TEXTSPLIT, TRIM, IF, LET, LAMBDA)\" | |\n| - \"Boolean values uppercase: FALSE, TRUE\" | |\n| - \"Function names uppercase: AVERAGE, INDEX, SCAN, REDUCE\" | |\n| - \"Multi-row descriptions use leading \\\"→\\\" for continuation lines\" | |\n| - \"Optional params have default value logic in LET section\" | |\n| - \"User's name appears in REVISIONS and VERSION\" | |\n| - \"Current date used in REVISIONS and VERSION\" | |\n| - \"No angle brackets (<>) in final output\" | |\n| - \"If multiple formulas selected, all are included in the LAMBDA\" | |\n| - \"Follow input cell detection rules for passthrough references\" | |\n| - \"Use SEQUENCE(1, n) for horizontal arrays in SCAN operations\" | |\n| - \"Prefer DROP over TAKE when removing elements from array\" |", "url": "https://wpnews.pro/news/experimenting-with-skills-for-copilot-for-excel", "canonical_source": "https://gist.github.com/CHatmaker/c443849f6584a2014e50e6bdabc82e02", "published_at": "2026-05-28 21:59:44+00:00", "updated_at": "2026-06-12 02:43:53.074365+00:00", "lang": "en", "topics": ["ai-tools"], "entities": ["Excel", "LAMBDA", "Advanced Formula Environment", "Excel Labs", "5G Modeling", "5gmodelling.com"], "alternates": {"html": "https://wpnews.pro/news/experimenting-with-skills-for-copilot-for-excel", "markdown": "https://wpnews.pro/news/experimenting-with-skills-for-copilot-for-excel.md", "text": "https://wpnews.pro/news/experimenting-with-skills-for-copilot-for-excel.txt", "jsonld": "https://wpnews.pro/news/experimenting-with-skills-for-copilot-for-excel.jsonld"}}