RE: remove last three characters of cell

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



This will not work for my case since the letter is always different.

"Ray A" wrote:

> Easier way
> Highlight column >Ctrl + H>Find , leave replace blank. This will erase all
> of the comma's in the column
>
> "mira" wrote:
>
> > Thanks, Access Expert! Your formula works really great!
> >
> > Now, I am trying to use the same formula to remove the last three characters
> > which contain a comma, a space, and one letter (it varies, and a wildcard
> > doesn't seem to work) (e.g. ", J"), how do I modify it to remove the last
> > three characters. I've been playing around with it, but don't know how to
> > specify the letter as a wildcard, if that's even possible.
> >
> > I want to to go from Doe, John, W --> Doe, John
> >
> > Thanks!
> >
> > "AccessExpert" wrote:
> >
> > > Mira,
> > >
> > > You can use a combination of the Left and Right functions. Insert a blank
> > > column to the right of column you wish to change. In my example I will
> > > assume the data is in column A. Change the formula as necessary.
> > >
> > > In the empty cell enter the formula:
> > > =IF(RIGHT(A1,1)=",",LEFT(A1,LEN(A1)-1),A1)
> > >
> > > This formula is checking to see if the last character in cell A1 is infact a
> > > comma. If it is the formula will return all of the characters in cell A1
> > > except the last one. If it is not a comma then will just return the entire
> > > contents of cell A1.
> > >
> > > Copy this formula down to all the rows necessary. Then Copy the entire
> > > column and paste the values over the original column (A). Make sure you use
> > > the Paste Special and choose the Values Option. Now you should be able to
> > > delete Column B.
> > >
> > >
> > > "mira" wrote:
> > >
> > > > I am trying to remove a comma which happens to be the last character in the
> > > > cell. Does anyone know how to do this?
> >
.



Relevant Pages

  • Re: remove last three characters of cell
    ... "Dave Peterson" wrote: ... I am trying to use the same formula to remove the last three characters ... >> specify the letter as a wildcard, ... If it is not a comma then will just return the entire ...
    (microsoft.public.excel.misc)
  • Re: Periodic Table
    ... hardly notice these bugs, but if the situation were reversed and I ... had to switch from period to comma for certain things to work, ... characters except NUL, ... Actually, with MS Windows 98SE, you can use a comma in a file ...
    (comp.sys.hp48)
  • Re: Is this UTF-8 regular expression semantically correct?
    ... Although Joe's idea of permitting a local comma to be mapped to the ASCII comma seemed plausible, it does not look like this is the way that it is actually done. ... The way that it is actually done in Java is that although there is leeway in the specification of identifiers, everything else must be pure ASCII. ... But if you wish to allow pure native speaking language, ... source file characters accepted is implementation-defined. ...
    (microsoft.public.vc.mfc)
  • Re: CONTAINS and non-wildcard asterisk
    ... >> wildcard it, and you wrap it in single quotes. ... >> If you wrap the phrase with double quotes you will get wildcarding, but it>> will still match with test*. ... >> alphanumeric characters it strips them out and indexes the alphanumeric ... >> Looking for a book on SQL Server replication? ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Applesoft problem with reading text files
    ... It seems to stop reading a line of text when it encounters ... "The INPUT statement with one variable reads all characters up to the ... first comma to be added to the first variable, ... I personally still search for the SSAVE extra command! ...
    (comp.sys.apple2)