#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default trim leading spaces


I am trying to trim leading and ending spaces with
bl3 = UCase(bl1) 'convert to uper case

LTrim (bl3)
RTrim (bl3)

however it does not work

any ideas


--
captain bob
------------------------------------------------------------------------
captain bob's Profile: http://www.excelforum.com/member.php...o&userid=36988
View this thread: http://www.excelforum.com/showthread...hreadid=567887

  #2   Report Post  
Posted to microsoft.public.excel.misc
Jay Jay is offline
external usenet poster
 
Posts: 671
Default trim leading spaces

Try using:
bl3 = UCase(Trim(bl1))

"captain bob" wrote:


I am trying to trim leading and ending spaces with
bl3 = UCase(bl1) 'convert to uper case

LTrim (bl3)
RTrim (bl3)

however it does not work

any ideas


--
captain bob
------------------------------------------------------------------------
captain bob's Profile: http://www.excelforum.com/member.php...o&userid=36988
View this thread: http://www.excelforum.com/showthread...hreadid=567887


  #3   Report Post  
Posted to microsoft.public.excel.misc
Jay Jay is offline
external usenet poster
 
Posts: 671
Default trim leading spaces

I should have also mentioned that you have to assign the result of the
LTrim/RTrim to a variable.

So this should also work:
bl3 = UCase(bl1)
bl3 = LTrim(bl3)
bl3 = RTrim(bl3)

"Jay" wrote:

Try using:
bl3 = UCase(Trim(bl1))

"captain bob" wrote:


I am trying to trim leading and ending spaces with
bl3 = UCase(bl1) 'convert to uper case

LTrim (bl3)
RTrim (bl3)

however it does not work

any ideas


--
captain bob
------------------------------------------------------------------------
captain bob's Profile: http://www.excelforum.com/member.php...o&userid=36988
View this thread: http://www.excelforum.com/showthread...hreadid=567887


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to trim spaces from entered text in cell using exisiting functions? rj Excel Worksheet Functions 4 April 19th 06 08:40 PM
Keeping leading 0's CLR Excel Discussion (Misc queries) 3 March 3rd 06 10:45 PM
How do I add leading spaces to a value? Chris Brown Excel Worksheet Functions 3 March 3rd 06 05:23 PM
Strip leading spaces from cell Pete Excel Worksheet Functions 3 July 31st 05 02:26 AM
Remove Leading Spaces Kirk P. Excel Discussion (Misc queries) 3 March 3rd 05 01:30 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"