Clear empty space inside every cell in excel 2003 and 2007

D

Don Vito

Hi guys,
I have problem with empty space. In every cell before any
information(value,text, no matter ) there is 1 interval. I want to remove it
for entire worksheet this empty space. Is it possible? 10x in advance
 
J

Jacob Skaria

You can try out the below macro. If you are new to macros..

--Set the Security level to low/medium in (Tools|Macro|Security).
--From workbook launch VBE using short-key Alt+F11.
--From menu 'Insert' a module and paste the below code.
--Get back to Workbook.
--Run macro from Tools|Macro|Run <selected macro()>

Sub Macro1()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If Not cell.HasFormula Then cell = Trim(cell.Text)
Next
End Sub

If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top