Possible Index Formula

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi All

Maybe the title of the topic is incorrect (?) but I would really appreciate some help in discovering a formula that would allow me to do this in excel (I am using excel 2003 for info).

Thanks again in advance.

Kind Regards
 
Upvote 0
Hi All

Maybe the title of the topic is incorrect (?) but I would really appreciate some help in discovering a formula that would allow me to do this in excel (I am using excel 2003 for info).

Thanks again in advance.

Kind Regards
I think the problem is that we can't make heads or tails out of what's posted in the Google SS. I know I can't!

Post some sample data here and tell us what result you expect.
 
Upvote 0
UDF. Place it to cell B2.
Horse - is a cell with horse (say, Range("A2"))
Prices - row with prices (Range("A10")
Code:
[COLOR="Blue"]Function[/COLOR] ExtractPrice(Horse [COLOR="Blue"]As[/COLOR] [COLOR="Blue"]String[/COLOR], Prices [COLOR="Blue"]As[/COLOR] [COLOR="Blue"]String[/COLOR]) [COLOR="Blue"]As[/COLOR] [COLOR="Blue"]Double[/COLOR]
    [COLOR="Blue"]With[/COLOR] CreateObject("VBScript.RegExp")
        .Pattern = "\b(\d+)/(\d+)\s+" & Horse & "\b"
        [COLOR="Blue"]With[/COLOR] .Execute(Prices)(0)
            ExtractPrice = .SubMatches(0) / .SubMatches(1)
        [COLOR="Blue"]End[/COLOR] [COLOR="Blue"]With[/COLOR]
    [COLOR="Blue"]End[/COLOR] [COLOR="Blue"]With[/COLOR]
[COLOR="Blue"]End[/COLOR] [COLOR="Blue"]Function[/COLOR]
 
Upvote 0
Hi Sektor

Many thanks for your reply, unfortunately I require a formula and not coding as I do not understand coding. Apologies

Kind Regards
 
Upvote 0
1. Press Alt+F11
2. Insert -> Module
3. Paste my UDF.
4. Type in B2: =ExtractPrice(A2,A10)
 
Upvote 0
Hi Sektor

Many thamks for your reply but it does not work for me and I dont understand coding and I really require a formula. Apologies

Kind Regards
 
Upvote 0
Hi All

Does anyone have any ideas as to a possible solution.

Thanks in advance.

Kind Regards
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,713
Members
452,939
Latest member
WCrawford

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