ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   LTrim imported text (https://www.excelbanter.com/excel-programming/357364-ltrim-imported-text.html)

lookin

LTrim imported text
 
I imported text and need to Ltrim all the cells in a given row. How do
I do this?


Zack Barresse[_3_]

LTrim imported text
 
Hi there,

You could use a simple loop for this. Here is an example ...

Sub DeleteAllLeadingSpacesPlease()
Dim c as Range
For each c in Range("A1:Z1")
c.Value = Ltrim(c.Value)
Next c
End Sub

Change the range to suit.

HTH

--
Regards,
Zack Barresse, aka firefytr
To email, remove NOSPAM


"lookin" wrote in message
oups.com...
I imported text and need to Ltrim all the cells in a given row. How do
I do this?




lookin

LTrim imported text
 
Thank you! It worked perfect!



All times are GMT +1. The time now is 10:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com