If data in one column = A or B or C, then X

[Closed]
Report
-
 jpaul -
Hello,
I have a list of technologies in one column with long names. I want to keep that column but in a new column I want the shorter names.

Column A: Comp-Optical, Comp-Wireless (ect..) Then return the value Optical, Wireless, (ect) in Column B
What formula can I use?

thanks,
Julie

2 replies

Posts
697
Registration date
Thursday May 14, 2009
Status
Member
Last seen
November 24, 2010
218
You just want to remove the "comp-"

try that

dim strng as string
dim L as interger
strng = "Comp-Optical"

L = len(strng)
'Comp- make 5 characters '

strng =Right(strng, L- 5)

' at this point strng shoulf be "Optical" '
If you are less tech savy and want a non-coding option, use Text-to-Columns.

Highlight the column with full text names, then on the Data tab of Excel 2007 choose Text to Columns. Delimit by "-" then you will have a column with "Comp" and a column with anything after the "-". Then you can just delete the first column if you want.