Trialing period

A

AltaEgo

The Trim() function will clean up both leading and trailing spaces:

Example

Trim(A1) will turn "cat " (without quotes) into "cat".

To use it to clean up your data:

1) Insert your formula in the first vacant column.
2) Copy down.
3) Copy the result
4) Over the original bad values, Edit/ Paste Special/ Values

The following custom function will trim trailing blanks only:

Function RightTrim(c As Range)
RightTrim = RTrim(c)
End Function

To use the above you would need to create a macro:
a) Follow the steps under "Create a macro using Microsoft Visual Basic" on
the following page
http://office.microsoft.com/en-us/excel/HP052047111033.aspx

Copy and paste the above three lines of codes at step (3)

b) After doing this, enter it the same way as any inbuilt function. Example

=RightTrim(A1)
 
S

ShaneDevenshire

Hi,

This removes the trailing spaces and period at the end of a cell's contents:

=LEFT(TRIM(C8),LEN(TRIM(C8))-1)
 
A

ACarella

Thank you for your response....
I have three scenarios.

Extinguish all ignition sources. Avoid sparks, flames, heat and smoking.
Ventilate.
(In this case it should remove the period after Ventilate)

Provide ventilation and confine spill. Do not allow runoff to sewer.
(In this case it should remove the period after sewer)


Keep away from ... (incompatible materials to be indicated by the
manufacturer)
(In this case ... is a variable and should be replaced with .?)

Can you help?
 

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