Skip to content

Instantly share code, notes, and snippets.

@Greedquest
Last active September 20, 2023 12:31
Show Gist options
  • Save Greedquest/e7b4e6863618e2f495a185902384d566 to your computer and use it in GitHub Desktop.
Save Greedquest/e7b4e6863618e2f495a185902384d566 to your computer and use it in GitHub Desktop.
SET Custom Excel LAMBDA module
/**Differences between 2 sets*/
DIFFERENCE = LAMBDA(a, b,
UNIQUE(VSTACK(UNIQUE(a), UNIQUE(b)), , TRUE)
);
/**Intersection of 2 sets (elements in both)*/
INTERSECT = LAMBDA(a, b,
DIFFERENCE(VSTACK(a, b), DIFFERENCE(a, b))
);
/**Set subtraction A - B (elements in A not in B)*/
SUBTRACT = LAMBDA(subtractB, fromA,
UNIQUE(VSTACK(UNIQUE(fromA), subtractB, subtractB), , TRUE)
);
@Greedquest
Copy link
Author

Greedquest commented Sep 20, 2023

Install Excel.Labs Advanced formula environment. Select the cloud to import

image

Use whatever module name you like + this gist's url

image

Prefix depends on module name you selected

Alternatively add to an existing Module (like the workbook module if you don't want a prefix) by activating that module before clicking the cloud icon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment