SUBSTITUTING TEXT FROM A LIST
Faraz,
You would need to use VBA to write a custom function:
=MySUB(A1,B1:B15,"")
Function MySub(Str1 As String, R1 As Range, Str2 As String) As String
Dim myC As Range
MySub = Str1
For Each myC In R1
MySub = Replace(MySub, myC.Value, Str2)
Next myC
MySub = Application.WorksheetFunction.Trim(MySub)
End Function
HTH,
Bernie
MS Excel MVP
"FARAZ QURESHI" wrote in message
...
I have a list of cells containing text to be removed from a collection. What
sort a formula would help to achieve an array matter like:
=SUBSTITUTE(A1,B1:B15,"")
with items in B1:B15 to be removed from text in A1?
Please help urgently.
Thanx!
|