Find all instances of parentheses in a call and replace with an S

Peptide

Board Regular
Joined
Apr 12, 2016
Messages
224
Office Version
  1. 365
Platform
  1. Windows
Hello - Looking for a FORMULA that can find all instances of parentheses and replace with an S. There can be up to 50 parentheses in a cell if that matter.

A1 = H2N-(dA)(dVaaaa)(Dava)(dC/CyMal)-OH
A2 - H2N-SSSS-OH

Possible?
 
Hi Rick,
No Mac and 1,000 lines would be max. I can hear your mind churning??
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi Rick,
No Mac and 1,000 lines would be max. I can hear your mind churning??
Then the code I gave you should cause no problems across any of your Excel versions (you are well below any Excel version limit thresholds for the functions I used that could possibly cause a problem).
 
Last edited:
Upvote 0
Rick - thanks again. I am not sure why we had the issue but I sent out a previous file with DBA's and we could not figure out why some users could not use (no mac's). I am going to hope that Marcelo (or someone else) may have a solution.

Thx Rick.
 
Upvote 0
Rick - thanks again. I am not sure why we had the issue but I sent out a previous file with DBA's and we could not figure out why some users could not use (no mac's). I am going to hope that Marcelo (or someone else) may have a solution.
The only formula solution I can think of uses multiple helper cells and a somewhat longish function to combine the results. I would note, though, that formulas are not my strong suit, so it is possible I am overlooking something. To help Marcelo and others, is there a maximum number of sets of parentheses that could appear in a single cell? If so, what is that number?
 
Upvote 0
To help Marcelo and others, is there a maximum number of sets of parentheses that could appear in a single cell? If so, what is that number?

Trying to create a formula - hard; if more than one text outside the parentheses - very hard! Is it possible?

Any pattern in the text outside the parentheses? Always 3 letters?

I have to leave now. I'll take a look later. Still thinking...

M.
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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