A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I delete a space at the end of an amount or text



 
 
Thread Tools Display Modes
  #1  
Old June 2nd, 2010, 09:05 AM posted to microsoft.public.excel.worksheet.functions
Maureen
external usenet poster
 
Posts: 125
Default How do I delete a space at the end of an amount or text

How do I delete a space at the end of an amount or text?
  #2  
Old June 2nd, 2010, 09:34 AM posted to microsoft.public.excel.worksheet.functions
Pete_UK
external usenet poster
 
Posts: 8,780
Default How do I delete a space at the end of an amount or text

You could do this:

=LEFT(A1,LEN(A1)-1)

assuming the data is in A1. This will return a text value - if you
want a number then do this:

=--LEFT(A1,LEN(A1)-1)

Hope this helps.

Pete

On Jun 2, 9:05*am, Maureen wrote:
How do I delete a space at the end of an amount or text?


  #3  
Old June 2nd, 2010, 09:49 AM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default How do I delete a space at the end of an amount or text

If that is a space the below will do. Also note all double spaces within the
text also will be trimmed to a single space.

=TRIM(A1)

Still you see a character after text; then probably it may not be a space.
Check that using the below formula..and replace the character using
SUBSTITUTE()
=CODE(RIGHT(A1,1))


--
Jacob (MVP - Excel)


"Maureen" wrote:

How do I delete a space at the end of an amount or text?

  #4  
Old June 2nd, 2010, 11:05 AM posted to microsoft.public.excel.worksheet.functions
Parag Satpute
external usenet poster
 
Posts: 2
Default Remove Spaces

Following formula would be able to remove spaces from words in Excel,
=REPLACE(A1,LEN(A1),1,"")



Jacob Skaria wrote:

If that is a space the below will do.
02-Jun-10

If that is a space the below will do. Also note all double spaces within the
text also will be trimmed to a single space.

=TRIM(A1)

Still you see a character after text; then probably it may not be a space.
Check that using the below formula..and replace the character using
SUBSTITUTE()
=CODE(RIGHT(A1,1))


--
Jacob (MVP - Excel)


"Maureen" wrote:

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
Entity Framework 4.0 and the AJAX Autocomplete Extender.
http://www.eggheadcafe.com/tutorials...rk-40-and.aspx
  #5  
Old June 2nd, 2010, 11:51 AM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Remove Spaces

Are you sure it will "remove spaces". That will only remove one space from
the end.

--
Jacob (MVP - Excel)


"Parag Satpute" wrote:

Following formula would be able to remove spaces from words in Excel,
=REPLACE(A1,LEN(A1),1,"")



Jacob Skaria wrote:

If that is a space the below will do.
02-Jun-10

If that is a space the below will do. Also note all double spaces within the
text also will be trimmed to a single space.

=TRIM(A1)

Still you see a character after text; then probably it may not be a space.
Check that using the below formula..and replace the character using
SUBSTITUTE()
=CODE(RIGHT(A1,1))


--
Jacob (MVP - Excel)


"Maureen" wrote:

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
Entity Framework 4.0 and the AJAX Autocomplete Extender.
http://www.eggheadcafe.com/tutorials...rk-40-and.aspx
.

  #6  
Old June 2nd, 2010, 12:06 PM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Remove Spaces

Oops..I notice now that the OP needs only 1 space to be removed which could
be achieved either using LEFT() or MID() or REPLACE()....

--
Jacob (MVP - Excel)


"Jacob Skaria" wrote:

Are you sure it will "remove spaces". That will only remove one space from
the end.

--
Jacob (MVP - Excel)


"Parag Satpute" wrote:

Following formula would be able to remove spaces from words in Excel,
=REPLACE(A1,LEN(A1),1,"")



Jacob Skaria wrote:

If that is a space the below will do.
02-Jun-10

If that is a space the below will do. Also note all double spaces within the
text also will be trimmed to a single space.

=TRIM(A1)

Still you see a character after text; then probably it may not be a space.
Check that using the below formula..and replace the character using
SUBSTITUTE()
=CODE(RIGHT(A1,1))


--
Jacob (MVP - Excel)


"Maureen" wrote:

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
Entity Framework 4.0 and the AJAX Autocomplete Extender.
http://www.eggheadcafe.com/tutorials...rk-40-and.aspx
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.