ExcelFlux

TRIM function

Remove extra ordinary spaces.

Text

Where can you use it?

Data preparation and reporting teams. Use this group to clean, split or reformat IDs, names and descriptions before using them in reports.

Scenario in the workbook

Clean ordinary spaces in imported names. Nonbreaking spaces need separate handling.

A worked example from the workbook

RowA
6Input
7North Hub
8AB-042
9
Record 1
=TRIM(A7)

Expected resultNorth Hub

See the inputs and instructions for all 3 examples

Copyable formulas

English Excel · en-US
=TRIM("  L01   Warehouse  ")
Turkish Excel · tr-TR
=KIRP("  L01   Depo  ")

Example and expected result

It removes ordinary spaces. Convert nonbreaking spaces copied from the web with SUBSTITUTE first.

Expected result L01 Warehouse.

Worked examples

Clean ordinary spaces in imported names. Nonbreaking spaces need separate handling.

Open the English sheet. Inputs begin at A6. F7:F9 show the live results and G7:G9 show the original results for comparison.

Row A
6 Input
7 North Hub
8 AB-042
9
Case Formula Expected result
Record 1 =TRIM(A7) North Hub
Record 2 =TRIM(A8) AB-042
Record 3 =TRIM(A9) Empty text
Microsoft Excel reference