Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text Cell
I have a series of data imported into a spreadsheet. After Importing, there
is an apostrophie in the first character and two spaces at the end of the text that the trim function will not remove. Has anyone seen this error and if so do you know how to remove the apostrophie and the end spaces? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text Cell
ActiveCell.Value = Trim(Application.Substitute(ActiveCell.Text,chr(16 0),"
")) worked for me. -- Regards, Tom Ogilvy "Dan T" .(donotspam) wrote in message ... I have a series of data imported into a spreadsheet. After Importing, there is an apostrophie in the first character and two spaces at the end of the text that the trim function will not remove. Has anyone seen this error and if so do you know how to remove the apostrophie and the end spaces? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text Cell
As I said, it removed the apostrophe for me and use
ActiveCell.Value = ActiveCell.Text or even ActiveCell.Value = ActiveCell.Value Is a common way to overcome this problem. The apostrophe is treated as a formatting character and forces the value of the cell to be text. Even if it stays, if you cell should be text, it doesn't create a problem, but as I said, the method I provided does remove it. I can only imagine you altered it in some way or the cell is other than what you have described. Mid it isn't looking at the letters as one. It is ignoring the apostrophy Do an =Len(A1) on your cell and you will see the apostrophy isn't counted. Regards, Tom Ogilvy "Dan T" .(donotspam) wrote in message ... Ok, Tried that, but it still has the apostrophie in the front. If I try the Mid function to remove the first character it removes the first letter with it so somehow it is looking at the letter and the apostrophie as one, although they appear seperate when I activate the cell. "Tom Ogilvy" wrote: ActiveCell.Value = Trim(Application.Substitute(ActiveCell.Text,chr(16 0)," ")) worked for me. -- Regards, Tom Ogilvy "Dan T" .(donotspam) wrote in message ... I have a series of data imported into a spreadsheet. After Importing, there is an apostrophie in the first character and two spaces at the end of the text that the trim function will not remove. Has anyone seen this error and if so do you know how to remove the apostrophie and the end spaces? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to manually copy text from one cell to end of other text cell | Excel Discussion (Misc queries) | |||
Enter text in a cell to return a text value in same cell | Excel Discussion (Misc queries) | |||
Copy text from cell to cell with one cell changing text | Excel Worksheet Functions | |||
Deleting Rows based on text in cell & formatting cell based on text in column beside it | Excel Programming | |||
extracting text from within a cell - 'text to rows@ equivalent of 'text to columns' | Excel Programming |