+ Reply to Thread
Results 1 to 12 of 12

Changing Three Functions Into Excel Vba

  1. #1
    Registered User
    Join Date
    03-16-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    97

    Changing Three Functions Into Excel Vba

    I dont know if this is possible and any help will be much appreciated.

    In Cells AD5 - AF7 i have a series of functions that determine 1st 2nd and 3rd place getters, Determined by Most laps in the least amount of time.

    i Want to know if it is possible to convert this into vba code thanks.

    Example.xlsm
    Last edited by radar_jynx; 06-08-2009 at 09:42 AM. Reason: more descriptive

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Changing Three Functions Into Excel Vba

    Have you tried recording a macro of you entering the formulae?

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Changing Three Functions Into Excel Vba

    Why, Excel Functions are generally faster than VBA.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    03-16-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Changing Three Functions Into Excel Vba

    Because i need an alternative to those functions, because they dont work with the plug in im using as they are to complex. I dont need an exact copy of that function in vba code just an alternative to evaluate the first, second and third place getters determined by most laps in 1 range followed by least amount of time. eg.

    Rider 1
    Rider 2
    have a total of 8 laps , total time of 10minutes

    Rider 3
    Rider 4
    have a total of 6 laps, total time of 10 minutes

    Rider 5
    Rider 6
    have a total of 8 laps, total time of 9 minutes

    1st place = "Rider 5 & Rider 6"
    2nd Place = "Rider 1 & Rider 2"
    3Rd Place = "Rider 3 & Rider 4"

  5. #5
    Registered User
    Join Date
    03-16-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Changing Three Functions Into Excel Vba

    Any Help Much Appreciated thanks

  6. #6
    Registered User
    Join Date
    03-16-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Changing Three Functions Into Excel Vba

    Bump Please?

  7. #7
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,936

    Re: Changing Three Functions Into Excel Vba

    Can you post a .XLS file I don't have 2007 and I don't understand your example well?
    Ben Van Johnson

  8. #8
    Registered User
    Join Date
    03-16-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Changing Three Functions Into Excel Vba

    Example.xls
    Here ya go, thanks for the reply.

  9. #9
    Registered User
    Join Date
    03-16-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Changing Three Functions Into Excel Vba

    I figured out that functions don't work with the plug in because of the arrays, so maybe if there's away around getting the same result without using the array type formulas {}.

    Heres an example of the functions im using -

    to determine most laps
    Please Login or Register  to view this content.
    to determine least amount of time with most laps
    Please Login or Register  to view this content.
    to return the riders names based on those values
    Please Login or Register  to view this content.

  10. #10
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,936

    Re: Changing Three Functions Into Excel Vba

    Have a look at the VBA sol'n attached. I had to guess about a lot since there were no times entered in the original... There's some extra formatting, but that was just for my tracing.

    race stats (bvj).xls

  11. #11
    Registered User
    Join Date
    03-16-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Changing Three Functions Into Excel Vba

    Yeah thats really good thank you, I was just looking at my example i posted and it isnt very good sorry.

    If you could please have a look at this one it mite help u understand better. Dont worry about the best lap, total time, team time, total laps and team laps on the RCalc Worksheet as my actual page generates them.

    On Standings Worksheet you will see how i want the names to be generated.

    Example 2.xls

    Your help is greatly appreciated.

  12. #12
    Registered User
    Join Date
    03-16-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Changing Three Functions Into Excel Vba

    Thanks Heaps man, i worked through your code and ended up coming up with the right thing i needed.

    Cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1