Trim the name from mid

Sunline

Well-known Member
Joined
Oct 6, 2007
Messages
701
Office Version
  1. 2016
Platform
  1. Windows
Hello all ,

I am needing to get a function or two that can give me the results I have in col BQ .

The name is always to the immediate left of the number in brackets .
The name will not contain any numbers at all .

I am looking to get the exact result but if I can get very close that will be fine .

Thanks .
Excel Workbook
BPBQ
1FHBASCResult
21. * 98443 Cornelius (2) 5.0 g bCornelius
32. * 31315 El Corby (6) 5.0 g bEl Corby
43. * 75323 Coolibah (4) 5.0 g bCoolibah
54. * 61444. Nancylee (5) 5.0 m chNancylee
65. * 00x75 Carbonado (7) 8.0 g blkCarbonado
76. * 60160 Iz (1) 5.0 g bIz
87. * 18845 Edward The Eighth (3) 5.0 g bEdward The Eighth
91. * 4093 All Zedin Done (2) 6.0 g brAll Zedin Done
102. * 59x63 Politicalnitemare (13) 4.0 g bPoliticalnitemare
113. * 56734 Varro (5) 6.0 g bVarro
124. * 00207 Sir Al Syd (9) 9.0 g bSir Al Syd
135. * 04058 Absolute Gem (10) 5.0 g b brAbsolute Gem
146. * x5606 Bad Taste (7) 6.0 g bBad Taste
157. * 00078. Captain Earnie (8) 4.0 g chCaptain Earnie
1610. * 60. Mojave (6) 4.0 g chMojave
1711. * 26250 Chloe Keeper (11) 7.0 m bChloe Keeper
1812. * 36435 Ina Jam (12) 4.0 m bIna Jam
1913. * 55 Chumana (4) 4.0 m chChumana
2014. * 06906 Izzanorange (3) 5.0 m chIzzanorange
211. * 97907 Billie Jean King (3) 6.0 m bBillie Jean King
222. * 153x3 Cape Mapperley (1) 4.0 m chCape Mapperley
233. * x0013. Steffi's Secret (7) 4.0 m brSteffi's Secret
244. * 1. High Tail It (4) 4.0 m brHigh Tail It
255. * 90636 Belinda's Girl (5) 8.0 m bBelinda's Girl
266. * 51940 Amber Rayne (8) 3.0 f bAmber Rayne
277. * 91090 Our Queen Bee (6) 4.0 m blkOur Queen Bee
288. * 866. Lola Brigida (2) 6.0 m bLola Brigida
292. * 38x Indian Giva (4) 3.0 g chIndian Giva
303. * Dartmoor (12) 3.0 g bDartmoor
314. * Mongolian Hero (8) 3.0 c bMongolian Hero
325. * Thewayyourave (11) 3.0 g bThewayyourave
337. * Elfee (13) 3.0 f brElfee
348. * Mary Quant (10) 3.0 f bMary Quant
359. * Sea Of Speed (9) 3.0 f grSea Of Speed
3620. * 9x Zah Best (10) 3.0 f bZah Best
371. * 4632 Heeza Dreimer (12) 5.0 g bHeeza Dreimer
382. * 0x363 Justabout Ready (16) 4.0 g br blkJustabout Ready
393. * 8465 El Sparky (6) 5.0 g grEl Sparky
405. * 532. Chasing Amy (4) 4.0 m bChasing Amy
417. * 53528. Gold Vault (10) 5.0 m bGold Vault
427. * 5826. Mary Magdalene (7) 4.0 m bMary Magdalene
438. * 4x0x0 Oh So Famous (5) 4.0 m chOh So Famous
443. * 3020x Esprit D'Or (5) 9.0 g bEsprit D'Or
454. * 08483. Fiddler's Green (2) 10.0 g bFiddler's Green
465. * x8980. Comanche Gold (3) 7.0 g chComanche Gold
476. * 024x9. Terelle (8) 6.0 g chTerelle
488. * 89x94. Ima Dude (7) 8.0 g bIma Dude
499. * 71154 Irish Excuse (6) 4.0 g bIrish Excuse
5015. * 02069. Sir Jack Remington (1) 5.0 g bSir Jack Remington
17-9-14 AVON GORE
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hi

Try this udf. In BQ2:

=GetName(BP2)

Code:
Function GetName(s As String) As String

With CreateObject("VBScript.RegExp")
    .Pattern = " [ a-zA-Z']+(?=\()"
    If .test(s) Then GetName = Trim(.Execute(s)(0))
End With
End Function
 
Upvote 0
Thank you pgc01 , this is exactly what i needed .
Thank you .
 
Upvote 0

Forum statistics

Threads
1,214,551
Messages
6,120,156
Members
448,948
Latest member
spamiki

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