如何删除 Excel 中单词之间不需要的逗号和连字符?
How to remove unwanted commas and hyphenate between words in Excel?
我有大量数据,我需要编辑和删除第 1 列中的逗号、括号和连字符,然后按照下面第 2 列中的说明进行编辑。
例子
column1
航空公司,-airport-and-aviation-management-(including-foundation-year)---bsc-(hons)
airline,-airport-and-aviation-management---bsc-(hons)
预期结果应该如下
column2
airline-airport-and-aviation-management-including-foundation-year-bsc-hons
airline-airport-and-aviation-management-bsc-hons
Sheet 几个解决方案(here/下面的截图)参考
这正在使用:
Function Compress(str As String, Optional BadChars As String = ",#.-&+@'~`[]{}<>/\|()")
##Remove default and custom chars..
##Adapted by 007-JB (01 07 21)
Dim Ch As Long
If Len(BadChars) <> 0 Then
For Ch = 1 To Len(BadChars)
str = Replace(str, Mid(BadChars, Ch, 1), "")
Next Ch
End If
Compress = str
End Function
我有大量数据,我需要编辑和删除第 1 列中的逗号、括号和连字符,然后按照下面第 2 列中的说明进行编辑。
例子
column1
航空公司,-airport-and-aviation-management-(including-foundation-year)---bsc-(hons) airline,-airport-and-aviation-management---bsc-(hons)
预期结果应该如下
column2
airline-airport-and-aviation-management-including-foundation-year-bsc-hons
airline-airport-and-aviation-management-bsc-hons
Sheet 几个解决方案(here/下面的截图)参考
这正在使用:
Function Compress(str As String, Optional BadChars As String = ",#.-&+@'~`[]{}<>/\|()")
##Remove default and custom chars..
##Adapted by 007-JB (01 07 21)
Dim Ch As Long
If Len(BadChars) <> 0 Then
For Ch = 1 To Len(BadChars)
str = Replace(str, Mid(BadChars, Ch, 1), "")
Next Ch
End If
Compress = str
End Function