none
VBA: WorksheetFunction RRS feed

  • Question

  • Using Excel 2013

    All my code using WorksheetFunction that previously worked fine are now not working, including simple ones like Max & Min. Sample code below:

            Set milesRng = Range("summary_Miles")
            rawMax = Application.WorksheetFunction.Percentile(milesRng, 0.9)
            binIncr = Application.WorksheetFunction.RoundUp(rawMax / 15, -2)

    I not aware of any changes I made to Excel/VBA settings but these worked in earlier versions of my spreadsheet.

    Thanks for any ideas.

    Tuesday, February 2, 2016 11:15 PM

All replies

  • Hi Ken,

    What do you mean now not working? Does it throw error or you don’t get the except result?

    I just made the test in excel 2013 (e.g. 1,2,3,4; 0.3), it works fine (don’t through error)

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, February 3, 2016 8:29 AM
    Moderator
  • It depends on the function. MAX & MIN will return zero while the percentile errors out. Initially these were all working in my code too; then they stopped working.
    Wednesday, February 3, 2016 1:00 PM
  • Hi Ken,

    Do you mean the result isn’t zero while the percentile errors out? What’s the values of milesRag? Please provide the sample data and result.

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, February 4, 2016 6:22 AM
    Moderator