Retrieve class and stakes from data .

Sunline

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

Im wanting to get a function that can get the results I have in cols B and C from
the data in col A .

I already have functions to get the 1400m and F1 as in cell A2 etc .

Thanks .
Excel Workbook
ABC
1DataClassStakes
2Mdn 3yo $6K 1400m F1Mdn 3yo$6K
3OPN HCP C/WGT 1000 SOPN HCP C/WGT
4HCP $58K 1110m GHCP$58K
5GRAZIA STYLE $177K 1100m GGRAZIA STYLE$177K
60 - 91 $80K 1200m G0 - 91$80K
7Rating 70 SW+P $10K 1400m G3Rating 70 SW+P$10K
8MDN 2YO C/WGT 450 DMDN 2YO C/WGT
9OPN HCP $100K 1400m H10OPN HCP$100K
10Mdn & JMP HWT $6K 2100m G2Mdn & JMP HWT$6K
Sheet1
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Try this for column B:

=IF(ISERR(FIND(" $",A2)),LEFT(A2,FIND(" C/WGT ",A2)+5),LEFT(A2,FIND(" $",A2)-1))

and this for column C:

=IF(ISERR(FIND(" $",A2)),"",MID(A2,FIND(" $",A2)+1,FIND(" ",A2,FIND(" $",A2)+2)-(FIND(" $",A2)+1)))
 
Upvote 0
Thanks mjbeam , they both work great .

Can I push my limits here and ask for a function to get from the data in col A here .

Mostly all left of the word "of" in col A , except row 6 .

Thanks again .
Excel Workbook
AB
1DataResult from data
217 days 2nd up 11 of 1311
314 days 6th up F of 12F
4u/p of 8u/p
513 days 4th up 1st of 91
628 days 5th up 4th4
72 of 72
8154 days 1st up 10th of 1210
99 days 14th up L of 7L
101st of 131
1129 days 3rd up 8 of 08
Sheet1
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,388
Members
448,957
Latest member
Hat4Life

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