Loading
Ozgrid Excel Help & Best Practices Forums

Excel Training / Excel Dashboards Reports



Results 1 to 4 of 4

Thread: Quartile Function In VBA

  1. #1
    Join Date
    1st August 2008
    Posts
    3

    Quartile Function In VBA

    Hi All,

    Im looking to use vba to determin upper and lower quartiles, i know how to do this through excel "QUARTILE(B9:B59990,1)", but was wondering if anyone would of any code to do this in visual basic?

    Any advice welcome

    Thanks

    VBA_Worker2

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    18th November 2004
    Location
    God's Own Country
    Posts
    4,648

    Re: Quartile Function In Visual Basic (vb)

    Hi VBA_Worker2,

    Welcome to board!

    This works for me

    VB:
    Dim Ary, wf As WorksheetFunction 
    Ary = Array(5, 4, 9, 1, 6) 
     
    Set wf = Application.WorksheetFunction 
    MsgBox wf.Quartile(Ary, 1) 
    
    
    HTH

  3. #3
    Join Date
    1st August 2008
    Posts
    3

    Re: Quartile Function In VBA

    Thanks Krishnakumar

    this is brilliant.
    Last edited by Dave Hawley; August 2nd, 2008 at 10:14.

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    6th February 2016
    Posts
    1

    Re: Quartile Function In Visual Basic (vb)

    Quote Originally Posted by Krishnakumar View Post
    Hi VBA_Worker2,

    Welcome to board!

    This works for me

    VB:
    Dim Ary, wf As WorksheetFunction 
    Ary = Array(5, 4, 9, 1, 6) 
     
    Set wf = Application.WorksheetFunction 
    MsgBox wf.Quartile(Ary, 1) 
    
    
    HTH

    I found that "Evaluate(Application.WorksheetFunction.Quartile(oRngTemp, 4)" fails when the range' local address "oRngTemp.AddressLocal" has $ in the address, i.e $BC$13:$BC$17. Not all cells are evaluated to find desired statistic.

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

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

Possible Answers

  1. Quartile Chart For Productivity Accuracy/Assessment
    By XLinXL in forum Excel General
    Replies: 2
    Last Post: May 6th, 2008, 11:27
  2. Conditional quartile array function
    By breakingstein in forum Excel General
    Replies: 2
    Last Post: September 1st, 2005, 17:26

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
  •  
porno