Related:
- If data in one column = A or B or C, then X
- Data validation multiple columns - Guide
- Excel - Compare data from two columns - How-To - Excel
- Copy data from one column to another excel - Guide
- Copy range data in a column to new column. ✓ - Forum - Excel
- Need to find a data in a column and copy below cell data or add ✓ - Forum - Excel
2 replies
sadgurl
Aug 31, 2009 at 11:43 AM
- Posts
- 697
- Registration date
- Thursday May 14, 2009
- Status
- Member
- Last seen
- November 24, 2010
Aug 31, 2009 at 11:43 AM
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" '
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.
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.