Forum Discussion
Leading spaces in cells
Hi!
Very recently my workplace decided to start a shared Excel document (accessed via OneDrive). I am reasonably competent with regards to the basics of Excel but can't seem to resolve this issue. Essentially certain in certain cells a leading space is added to whatever text is entered regardless if typed in or pasted from another source. It is a small gripe but frustrating as some of the columns have a VLOOKUP formula and the extra space means it does not recognise the entered text as a valid account or product code. I have never had this issue with the desktop version of Excel. I have tried =TRIM but for some reason this just ended up creating a duplicate of the selected range eg
3 Replies
- SergeiBaklanDiamond Contributor
Is that only in Excel for web? And how do you know these are spaces, not some other not printable characters?
- nimeshtIron Contributor
Hi Petachu454 ,
Did you try using the https://support.microsoft.com/en-us/office/xlookup-function-b7fd680e-6d10-43e6-84f9-88eae8bf5929 formula instead of VLOOKUP, with match_mode as 1 or 2.
- Petachu454Copper ContributorThanks, I was not aware of this. If I can't fix the issue with the spaces then I may recommend changing the formula.