Skip to content

Instantly share code, notes, and snippets.

@jkpieterse
jkpieterse / Blank snippet.yaml
Created May 17, 2017 13:25
Shared with Script Lab
name: Blank snippet
description: ''
author: jkpieterse
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(run);
async function run() {
@jkpieterse
jkpieterse / Blank snippet.yaml
Created May 17, 2017 14:00
Shared with Script Lab
name: Blank snippet
description: ''
author: jkpieterse
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(run);
async function run() {
@jkpieterse
jkpieterse / Mutliply range with 5.yaml
Created May 17, 2017 14:01
Shared with Script Lab
name: Mutliply range with 5
description: ''
author: jkpieterse
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(run);
async function run() {
@jkpieterse
jkpieterse / Mutliply range with 5.yaml
Created May 17, 2017 14:05
Shared with Script Lab
name: Mutliply range with 5
description: ''
author: jkpieterse
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(run);
async function run() {
@jkpieterse
jkpieterse / excel-lambda-SheetName.txt
Last active October 18, 2023 16:27
Excel lambda to get the name of the worksheet into a cell. Import this using the Excel Advanced Formula Environment add-in
SheetName =LAMBDA(cl,LET(f,CELL("filename",cl),MID(f,FIND("]",f)+1,LEN(f))))
@jkpieterse
jkpieterse / excel-lambda-quadraticequation.txt
Last active August 26, 2023 03:40
Excel lambda formula to calculate roots of a parabola
QuadraticEquation = LAMBDA(a, b, c,
(-b + {-1, 1} * SQRT(b ^ 2 - 4 * a * c)) / 2 / a
);
@jkpieterse
jkpieterse / Excel-lambda-water97.txt
Last active April 14, 2024 12:54
Excel Lambda functions to calculate thermodynamic properties of water
cpreg1 = LAMBDA(temp, press,
LET(
tau, 1386 / temp,
pi, 0.1 * press / 16.53,
-0.001 * rgas_water * tau ^ 2 * gammatautaureg1(tau, pi)
)
);
cpreg2 = LAMBDA(temp, press,
LET(
@jkpieterse
jkpieterse / Name a range.EXCEL.yaml
Last active April 3, 2022 18:02
Names the selected range using TypeScript.
name: Name a range
description: |-
Names the selected range
using TypeScript.
host: EXCEL
api_set: {}
script:
content: >
//The event handler of the button to add the name
@jkpieterse
jkpieterse / FindItAll (5).EXCEL.yaml
Last active June 6, 2022 00:48
Finds all cells on a worksheet
name: FindItAll (5)
description: Finds all cells on a worksheet
host: EXCEL
api_set: {}
script:
content: >
document.addEventListener("keydown", function(event) {
if (event.altKey && event.code === "KeyT") {
$("#searchText").focus();
event.preventDefault();
@jkpieterse
jkpieterse / DemoOfLocalizedSystemName.EXCEL.yaml
Created January 10, 2024 10:43
Create a new snippet from a blank template.
name: DemoOfLocalizedSystemName
description: Create a new snippet from a blank template.
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
await Excel.run(async (context) => {