Extracting specific text from 2 columns of text

Treeny

New Member
Joined
Sep 23, 2003
Messages
39
Hi all,

Can someone help me with the correct code for the following.

I'm trying to extract and display specific data from the following 2 columns of text.

----- HOLE CARDS -----
dealt to Treeny [2h 5c]
mastoras folds
cantor calls £1
Vicky raises £2
dire wolf raises £3
Aceofbabe folds
Jim011 calls £3
Young006 folds
garnet folds
Treeny folds
Steven031 folds
cantor folds
Vicky calls £1
----- FLOP ----- [2s 5s 3c]
Vicky checks
dire wolf bets £1
Jim011 calls £1
Vicky calls £1
----- TURN ----- [2s 5s 3c][Qc]
Vicky checks
dire wolf bets £2
Jim011 calls £2
Vicky calls £2
----- RIVER ----- [2s 5s 3c Qc][Qd]
Vicky checks
dire wolf checks
Jim011 checks
----- SHOW DOWN -----
Vicky shows [As Kd] (A Pair of Queens, Ace high)
dire wolf shows [Ad Ah] (Two Pairs, Aces and Queens, Five high)
Jim011 mucks hand
dire wolf collected £19.50 from Main pot
----- SUMMARY -----
Total pot £20.50 Main pot £19.50 | Rake £1
Board [2s 5s 3c Qc Qd]
Seat 1 Young006 folded before Flop (didn't bet)
Seat 2 garnet (button) folded before Flop (didn't bet)
Seat 3 Treeny (small blind) folded before Flop (didn't bet)
Seat 4 Steven031 (big blind) folded before Flop (didn't bet)
Seat 5 mastoras folded before Flop (didn't bet)
Seat 6 cantor folded before Flop (didn't bet)
Seat 7 Vicky lost
Seat 8 dire wolf showed [Ad Ah] and won (£19.50) with Two Pairs, Aces and Queens, Five high
Seat 9 Aceofbabe folded before Flop (didn't bet)
Seat 10 Jim011 mucked


1. Who has the word 'raises' to right of their name between the HOLE CARDS and FLOP headings.
2. For the names extracted in part 1 above, display the data in the square brackets from the SHOWDOWN section.

So what I'm after from the data above would look like this:

Vicky [As Kd]
dire wolf [Ad Ah]


Sometimes the data in the SHOWDOWN section will not be there so some sort of check needs to be made for this I guess.

Thanks in advance

PS The columns end and start after each persons name
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi,

A formula aproach:

EDIT: In the exibit below the formula in H column shows as array entered. That was a mistake! When copying the formulas, take away the curly brackets!
Book1
ABCDEFGH
1-----HOLECARDS-----HiddenResultHidden
2dealttoTreeny[2h5c] Vicky[AsKd]shows[AsKd](APairofQueens,Acehigh)
3mastorasfolds direwolf[AdAh]shows[AdAh](TwoPairs,AcesandQueens
4cantorcalls1   #N/A
5Vickyraises25  #N/A
6direwolfraises36  #N/A
7Aceofbabefolds 
8Jim011calls3 
9Young006folds 
10garnetfolds 
11Treenyfolds 
12Steven031folds 
13cantorfolds 
14Vickycalls1 
15-----FLOP-----[2s5s3c] 
16Vickychecks 
17direwolfbets1 
Sheet3
 
Upvote 0

Forum statistics

Threads
1,221,527
Messages
6,160,342
Members
451,638
Latest member
MyFlower

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