Excel
#23

Sanitizing Unseen Whitespace and Non-Breaking Spaces in Raw Exports

EasyAccenture
Interview Question #23
Asked at Accenture

A web ERP export of Account Codes in `A2:A100` produces `#N/A` in VLOOKUP despite matching visually. The export contains leading spaces, trailing spaces, and web non-breaking spaces (`CHAR(160)`). Write a formula in `B2` to completely sanitize the text.

Input Table: RawExport (A1:A3)
2 rows preview
Raw Account String (Col A)Issue
ACC-901 Leading and trailing standard spaces
ACC-902 Non-breaking space (CHAR 160) at end
Expected Output Structure2 rows
Cleaned Account Code (Col B)
ACC-901
ACC-902
Interview Context

Asked frequently in data analyst and business analyst technical rounds. Focus on clean filtering, optimal indexing usage, and unambiguous column selection.

Microsoft Excel 365
E2fx
ABCDEF
1
Raw Account String (Col A)
Issue
2
ACC-901
Leading and trailing standard spaces
Target [Enter Formula]
3
ACC-902 
Non-breaking space (CHAR 160) at end
4
5
6
7
Click on target cell E2 and enter your formula above.Shortcut: Click "Load Solution" to inspect
Chat with us