extract block of data delimited by parentheses

tuli1954

New Member
Joined
Apr 26, 2018
Messages
13
hello,

I have a text file with blocks of data defined by parentheses, something similar to

(
asas
dsdss
)
(
wwqee
weqqe
)

I need to extract the content between the parentheses. the problem is that sometimes the parentheses are nested.
any suggestions?

Thank you
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
1. How you want extract nested Paranthesis. E.G. ( aaa1 ( bbb1 ( ccc1) bbb2) aaa2) Extraxt to what?
2. What is your maximum nested paranthesis?
3. What is address (Range) of Data?
 
Upvote 0
1. each block would occupy a column like EG.
(
B1
B2
B3
)
(
C1
C2
C3)
(
.
.
.
)
Z1,

Z2
Z3))

would turn into

B1 C1 … Z1
B2 C2 … Z2
B3 C3 … Z3

2. unknown a priori, was thinking to just count the number of "(" and ")" before running the "conversion algorithm"

3. the source is a text file not a range in a a sheet
 
Upvote 0
Please upload an real example. Descriptipn not Clear & clarify.
I think you wanted result ( with your example)
B1 B2 B3
C1 C2 C3
....
 
Upvote 0
Please upload an real example. Descriptipn not Clear & clarify.
I think you wanted result ( with your example)
B1 B2 B3
C1 C2 C3
....
 

Attachments

  • nested_example_results.JPG
    nested_example_results.JPG
    49.8 KB · Views: 14
  • nested_example_source.JPG
    nested_example_source.JPG
    74.2 KB · Views: 13
Upvote 0
just uploaded a snapshot of a part of the source file and a snapshot of an excel sheet which illustrates what I am looking for

Thank you
 
Upvote 0
If it is possible, upload text file OR Paste Text here to I Work on it.
 
Upvote 0
If your Nested Parentheses is Origin, Main Reflector Type, Main_Rim & ...
If I correct Understand, you don't want to split text based them.
Then we should find Criteria to how don't separate based them also.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,657
Messages
6,120,764
Members
448,991
Latest member
Hanakoro

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