Filename Problem
Hey guys:
This is still not working.
"PCLIVE" wrote:
Oh sure, you can use that very plain and simple formula...or you could use
this one.
=LEFT(IF(LEFT(A2,3)="The",RIGHT(A2,LEN(A2)-4),LEFT(A2,LEN(A2)-5)),FIND(",",IF(LEFT(A2,3)="The",RIGHT(A2,LEN(A2)-4),LEFT(A2,LEN(A2)-4)))-1)
"Gary''s Student" wrote in message
...
=SUBSTITUTE(LEFT(A2,FIND(",",A2,1)-1),"The ","")
This will remove the comma and everything to the right of the comma. It
will also remove
The
as coded it looks for a capital T and a trialing blank
--
Gary's Student
"Help?" wrote:
I currently asked the below question and received the below equation
along
with several other equations. It works great, however, it will not
accomodate
for those employer names that do not have commas or the word "The". Can
anyone help in finding an equation that would accomodate for all three
cases?
__________________________________________________ _______
=LEFT(A2,FIND(",",A2,1)-1)
will return all the text to the left of the comma
--
Gary's Student
"Help?" wrote:
I currently have a excel macro that pulls information from the excel
columns
and adds it to the filename. Then, the macro will convert to csv file.
A
column exists in the file called EMPLOYER NAME. An individual will
insert a
company's name in this column. This will be pulled into the filename.
However, if a company is ABC Company, Inc. - the comma in the filename
throws
our printing system into a loop. So, I use the equation =LEFT(A2,FIND("
",A2))&MID(A2,FIND(" ",A2)+1,0) to only pull in the first portion of
the name
into another column and then insert the new name into the filename.
Works
good, but I am now running into the problem of the name being The ABC
Company, Inc. The comma is not present, but the filename is The. Does
anyone
know an equation I could use that would only pick out ABC Company and
leave
The and the comma out?
|