Forum Discussion
lnjohnson
Jun 07, 2023Copper Contributor
Identify characters and split into different sheets
How do i create a formula that scans a column, auto-identify similar characters(perhaps by first 3 characters) in a cell and then splits(extract) the cells with similar characters into different shee...
- Jun 14, 2023
Success! I was able to use ChatGPT and it produced the following code. I had to ask it separately for the match code, then paste it into the original code, but it works perfectly now. Thanks:
PeterBartholomew1
Jun 09, 2023Silver Contributor
As a functional programming environment, Excel formulas cannot 'put' extracts anywhere except the cell in which the formula is written. VBA, being an imperative programming language, can change the state of other cells.
So, a formula solution must have a formula that reads the 'sourceRange' on every sheet you wish to write to.
= LET(
tail, TEXTAFTER(sourceRange, string),
FILTER(tail, ISTEXT(tail))
)
[The image shows the ranges on the same sheet for convenience]