Arte SheetsLearn. Try. Understand.

Text & Cleaning

Add OS-Specific Line Breaks: LF CHAR(10) vs. Windows/RFC-4180 CRLF Payloads

Assemble multi-line shipping addresses, EDI blocks, and RFC-4180 CSV cells using configurable LF (CHAR(10)) or CRLF (CHAR(13)&CHAR(10)) delimiters while skipping empty address lines.

When CHAR(10) alone is enough vs when downstream parsers require CRLF

Inside worksheet cells on macOS, Windows, and web browsers (including Arte Sheets), CHAR(10) (Line Feed, LF) is the standard internal newline character rendered when text wrapping is enabled. However, legacy Windows ERP importers, SMTP headers, ZPL thermal label printers, and strict RFC-4180 CSV parsers expect Carriage Return + Line Feed—CHAR(13) & CHAR(10) (CRLF).

Parameterizing the line-ending delimiter by target target_os ("WIN_CRLF" -> CHAR(13) & CHAR(10), otherwise CHAR(10)) and passing ignore_empty = TRUE to TEXTJOIN builds clean multi-line blocks that never emit double blank lines when Suite/Floor (Address Line 2) is empty.

Target ProfileDelimiter ExpressionBytes per BreakLine Count Formula
Unix / macOS / Web Cell (LF)CHAR(10)1 charLEN(txt) - LEN(SUBSTITUTE(txt, CHAR(10), "")) + 1
Windows / RFC-4180 / EDI (CRLF)CHAR(13) & CHAR(10)2 charsLEN(SUBSTITUTE(txt, CHAR(13), "")) - LEN(SUBSTITUTE(txt, CHAR(10), "")) + 1

OS-Selectable Multi-Line Block with Blank-Line Suppression

Choose the delimiter from a target-system selector cell ($F$2) and let TEXTJOIN(..., TRUE, A2:D2) skip blank optional fields automatically.

=TEXTJOIN(IF($F$2 = "CRLF", CHAR(13) & CHAR(10), CHAR(10)), TRUE, A2:D2)

OS-Agnostic Non-Empty Line Count Audit

Count CHAR(10) occurrences plus 1 (guarded for empty strings) so line counts stay identical whether the payload uses LF or CRLF.

=IF(LEN(E2) = 0, 0, LEN(E2) - LEN(SUBSTITUTE(E2, CHAR(10), "")) + 1)

Try the example

Use the original values or change them to test your understanding.

Further reading