+ Reply to Thread
Results 1 to 3 of 3

AverageIF Formula in VBA

  1. #1
    Registered User
    Join Date
    06-14-2011
    Location
    Milwaukee, Wisconsin
    MS-Off Ver
    Excel 2003
    Posts
    7

    AverageIF Formula in VBA

    I am trying to have subtotals calculate a range of values in a column that includes 0s. I would like to exclude the 0s, so as to calculate the average of the values that aren't a 0 only.


    "=AVERAGE(IF(R" & startrow & "C" & inty & ":R" & intx - 1 & "C" & inty & " , " & " >0 " & "))"

    Any help would be greatly appreciated!

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: AverageIF Formula in VBA

    Jo Oqualli and welcome to the forum,

    Find the attached that you can use as an example to get your answer.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    06-14-2011
    Location
    Milwaukee, Wisconsin
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: AverageIF Formula in VBA

    Thank you so much @MarvinP
    It worked well, now just trying to find a way to hide the #Div/0!s

+ 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