+ Reply to Thread
Results 1 to 3 of 3

Average column

Hybrid View

damo_uk Average column 01-16-2012, 01:49 PM
arlu1201 Re: Marco - average column 01-16-2012, 02:07 PM
damo_uk Re: Marco - average column 01-16-2012, 02:18 PM
  1. #1
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Marco - average column

    You can assign a variable to the lastrow of column D ...for example -
    dim lrow as long
    
    lrow=range("D" & rows.count).end(xlup).row
    range("F2").formulaR1C1 = "=AVERAGE(RC[-2]:R[" & lrow & "]C[-2])"
    You do not require the Select statements and even the scroll down statements.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  2. #2
    Registered User
    Join Date
    03-04-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: Marco - average column

    Thank you very much Arlette.

    Answered my query perfectly

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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