Need to remove leading spaces within cell while retaining the Numbered Bullet Points

jack29

New Member
Joined
Apr 28, 2021
Messages
19
Office Version
  1. 365
Platform
  1. Windows
Hi,


This is my first thread.

I have following the steps to reproduce, my excel sheet column contains a lot of rows like below like 100 to 300's. But the problem is there few white spaces as leading characters which I don't want.

I have tried using TRIM() and CLEAN() functions it trims everything and presents below steps in one-liner like this --> "1. Open Browser.2. Open your application3. Add your order4. Proceed with payment.5. Exit Application", which I don't want, as I need to maintain the numbering fashion as displayed while removing leading whitespaces. Attached is sample

1. Open Browser.
2. Open your application
3. Add your order
4. Proceed with payment.
5. Exit Application

Thank you.
 

Attachments

  • Sample_2.jpg
    Sample_2.jpg
    103.1 KB · Views: 39
  • Sample_1.jpg
    Sample_1.jpg
    94.6 KB · Views: 40

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Is this perhaps just a formatting issue?
Try setting the cell format to Top Align ?????
 
Upvote 0
Is this perhaps just a formatting issue?
Try setting the cell format to Top Align ?????
No, I have tried this with Top and Left Align I usually always prefer, it's not removing the white space.
 
Upvote 0
screenshot showing that I have already tried using top align and left justified with cells.
 

Attachments

  • Sample_3.jpg
    Sample_3.jpg
    160.1 KB · Views: 28
Upvote 0
Don't use CLEAN as it will remove the line feed characters. Try just TRIM and make sure to turn word wrap on in the formula cell.
 
Upvote 0
Yes, I just twigged that for any text formula to display other than a single string, Word Wrap must be on for the formula cell.

If it is Line return that is causing the issue then maybe like below, where I have 2 leading line returns.

Book1
AB
18 1. agagaggatatta 2. stuf 3More stuff1. agagaggatatta 2. stuf 3More stuff
Sheet2
Cell Formulas
RangeFormula
B18B18=RIGHT(A18,LEN(A18)-2)
 
Upvote 0
Solution
This solves my issue. Actually to tell you I have used this formula many times before, to delete starting few characters using RIGHT and LEFT Functions. However, now I understand it serves the purpose this way as well, to delete the line return character.

Thank you, @Snakehips
 
Upvote 0
Don't use CLEAN as it will remove the line feed characters. Try just TRIM and make sure to turn word wrap on in the formula cell.
what you said is correct @RoryA , Clean() doesn't serve the purpose for me in this sceanrio. Just for showing samples, I wanted to convey to everyone that I had tried using both trim and clean.
 
Upvote 0
This solves my issue. Actually to tell you I have used this formula many times before, to delete starting few characters using RIGHT and LEFT Functions. However, now I understand it serves the purpose this way as well, to delete the line return character.

Thank you, @Snakehips
Just for future reference in case. I used the same formula but subtracted by zero, =RIGHT(A2,LEN(A2)-0), doing this it retained required characters, and remove leading whitespaces
 
Upvote 0

Forum statistics

Threads
1,223,907
Messages
6,175,300
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top