in a cell I have "8.0 (Evaluation Mode)". How can i remove only "(Evaluation Mode)?
in a cell I have "8.0 (Evaluation Mode)". How can i remove only "(Evaluation Mode)?
What is objectionable about "(Evaluation Mode)"?
The fact that it is inside parenthesis, or that it is after the first left parenthesis?
Perhaps
or=SUBSTITUTE(A1, "("&TRIM(MID(SUBSTITUTE(SUBSTITUTE(A1,"(",")"),")",REPT(" ",255)),255,255))&")", "")
might work=TRIM(LEFT(SUBSTITUTE(A1,"(",REPT(" ",255)), 255))
Mike,
Can this done with VBA?
The "(Evaluation Mode)" will be removed when the user enters a password.
Yes it could.
What result do you want from:
"John Smith (marry mode) Dave(single friend) Cat"
What code have you tried?
Mike,
the result i'm trying to achieve is to delete (Evaluation Mode) from 8.1 (Evaluation Mode) resulting in 8.1 remaining. The purpose for this is for display only.
Would =SUBSTITUTE(A1, "(Evaluation Mode)", "") do the job?
Yes it probably would, but that looks like a formula rather then vba? I would need to a vba to execute the change when the user enters a password.
If its that straight forward, you could record a macro of you Find&Replacing "(Evaluation Mode)" with "" and use that.
If you just want to replace a cell substring using VBA then
PaulOption Explicit Sub NoMoreEval() ActiveSheet.Cells(1, 1).Value = "Ver 8.1 (Evaluation Mode)" MsgBox ActiveSheet.Cells(1, 1).Value Call ActiveSheet.Cells(1, 1).Replace(" (Evaluation Mode)", vbNullString, xlPart) MsgBox ActiveSheet.Cells(1, 1).Value End Sub