Monthly Archives: October 2017

Insert a Line-Feed Between Every 3rd Character Using an Excel Worksheet Formula


Per an Oz Du Soleil post on how to separate 5 area codes in a single 15 character string with line breaks using Power Query  

here is a way to do the same thing using a worksheet formula.

With the string in cell A1. Enter the following array formula in a cell.


Make sure that you select word wrap enabled for the cell containing the formula.


Boolean Formula for Repetitive Characters in a String

  • My answer to a Chandoo challenge. Not exactly the question most are answering, however. More robust. So, the string “hellp” (in cell A1) would return TRUE but “helpl” would return FALSE. I chose the degree symbol (Alt 0176) as my unlikely used twice in a row character, but you can choose another.

=NOT(ISERROR(MATCH(TRUE,CODE(MID(A1,ROW(OFFSET($A$1,,,LEN($A$1))),1))*2=CODE(MID(A1&”°”,ROW(OFFSET($A$1,,,LEN($A$1))),1))+CODE(MID(A1&”°”,ROW(OFFSET($A$2,,,LEN($A$1))),1)),0)))  CSE