+ Reply to Thread
Results 1 to 2 of 2

Averaging a Range

  1. #1
    Registered User
    Join Date
    05-15-2013
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Averaging a Range

    For the life of me, I cant figure out what is wrong with this piece of code. It is saying that it cant pull the the worksheet function up.

    Selection.Cells((SelectionRows - 1), 9).Value = Application.WorksheetFunction.Average(Selection.Range(Cells(1, 9), Cells((SelectionRows - 1), 9)))

    Please help!
    Thanks in advance
    Alexis

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Averaging a Range

    I think it has less to do with the worksheet function and more to do with your use of Selection. Remove this one and see how it works. Outside a few scenario's you really shouldnt be using selection.

    Please Login or Register  to view this content.

+ 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