Get Error/Debug because average's worksheet function

  • I want to average a range of MSE but I get a debug message "Method 'Range' of Object ' _Global' failed.

    these are my code and i've got debug on

    MeanMSEMod = Application.WorksheetFunction.Average(Range(MSEMod))

    StdDevMSEMod = Application.WorksheetFunction.StDev(Range(MSEMod))

  • If they are named ranges try

         MeanMSEMod = Application.WorksheetFunction.Average(Range("MSEMod"))
         StdDevMSEMod = Application.WorksheetFunction.StDev(Range("MSEMod"))

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!