Site icon Kaizen.Personal computer work.

Formulas to extract text from a cell every specified number of letters.(Microsoft Excel)

Japanese version.

Here are formulas to extract any number of letters from the text of a cell at a time.

Formula

The CONCAT, MAKEARRAY, LEN, LAMBDA, MID, IF, and MOD functions are used in the formulas.

The blue and red areas should be changed.

=CONCAT(MAKEARRAY(1,LEN(Text),LAMBDA(row,col,IF(MOD(col,number)=0,MID(Text,col,1),""))))

Two letters are extracted from 12345abcde67890ABCDE to 24ace79ACE The result is 24ace79ACE.

Changing the number of characters changes the spacing.

If number is set to 3, the data is extracted at 3-character intervals.

Three letters are extracted from 12345abcde67890ABCDE to 24ace79ACE The result is 3ad70C.

The starting position can be adjusted by changing the argument of the MOD function.

=CONCAT(MAKEARRAY(1,LEN(Text),LAMBDA(row,col,IF(MOD(col,number)=Start,MID(Text,col,1),""))))

---

Exit mobile version