Editing large text cells

Manolocs

Active Member
Joined
Mar 28, 2008
Messages
340
Hello, I am wondering if there is a way to check a list of columns for a missing close parenthesis, I mean there is an open parenthesis, without a close ou vice versa.
Thanks in advance.
 
Last edited:
By the way, when I try the Function in post #9 with „(((ksfsf)gdg” I get „Missing” as a result.
Good catch (sloppy testing on my part:-(). Here is corrected code... if there is a backward pair, it reports that no matter what else may be wrong... for any other missing part, it gives the count of how many are missing.
Code:
[table="width: 500"]
[tr]
	[td]Function CheckParen(ByVal S As String) As String
  Dim X As Long
  For X = 1 To Len(S)
    If Mid(S, X, 1) Like "[!()]" Then Mid(S, X) = " "
  Next
  S = Replace(S, " ", "")
  Do While Len(S) > 1 And S Like "*()*"
    S = Replace(S, "()", "")
  Loop
  If S Like "*)(*" Then
    CheckParen = "Backward"
  ElseIf Len(S) Then
    CheckParen = "Missing " & Len(S) & " " & Choose(InStr("()", Left(S, 1)), ")", "(")
  End If
End Function[/td]
[/tr]
[/table]
 
Upvote 0

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top