I have a huge column of data and I need to edit and remove the commas, brackets and hyphen in column 1 and edit it as given in column 2 below.
example
column1
airline,-airport-and-aviation-management-(including-foundation-year)---bsc-(hons) airline,-airport-and-aviation-management---bsc-(hons)
The exected result should be as below
column2
airline-airport-and-aviation-management-including-foundation-year-bsc-hons
airline-airport-and-aviation-management-bsc-hons
Sheet couple of soln(s) for you (here/screenshot below) refers
This is using:
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