Return to site

Excel for mac add padding in cell

broken image

We’ll now clearly see the problem with TRIM() – while it worked in row 1 and removed all the normal spaces, it doesn’t do anything in row 2 and thus our ‘ TRIMED’ version is still the full 18-length string. Now copy/paste the three test cells B1:D1 and paste them into row 2 starting at B2. In this case for testing, CHAR(160) is a non-breaking space, so the contents of A2 appears to match that of A1, but in fact the spaces on either side for A2 are non-breaking. In Excel, the CHAR() function allows us to output characters based on the numeric identifier of that character.