+ Reply to Thread
Results 1 to 2 of 2

Excel VBA code to Average Non Zeros for Multiple Ranges

  1. #1
    Registered User
    Join Date
    06-29-2011
    Location
    Fort Lauderdale
    MS-Off Ver
    Excel 2018
    Posts
    22

    Excel VBA code to Average Non Zeros for Multiple Ranges

    I created this VBA code to average one or more ranges of nonzero numbers.

    Some example uses would be:

    =avgNonZeros(B2:B10,C2:C10,E2:E10)
    =avgNonZeros(Q22,R22,U22:Z22)
    =avgNonZeros(B2:B10,C10,E10)
    =avgNonZeros(B2:B10)

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,026

    Re: Excel VBA code to Average Non Zeros for Multiple Ranges

    Please Login or Register  to view this content.
    Last edited by BMV; 03-11-2020 at 01:45 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How do I average multiple columns (ignoring zeros and blank cells)?
    By yeto in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-04-2020, 12:36 PM
  2. AVERAGE - Multiple VLOOKUPs whilst ignoring zeros or blanks
    By Jake_1 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-20-2020, 01:00 PM
  3. [SOLVED] Averaging across multiple ranges, not counting zeros, and the [h]:mm format
    By Alphabex in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-28-2016, 03:43 PM
  4. [SOLVED] Averageif, not counting zeros, but in multiple ranges)
    By Alphabex in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-14-2015, 07:26 PM
  5. [SOLVED] how to average multiple averages that can contain zeros
    By BJB_88 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-16-2014, 07:06 PM
  6. [SOLVED] How do I get the average across multiple cells not in a range and not count the zeros/text
    By sponge_designs in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-31-2013, 03:05 AM
  7. [SOLVED] Average for non-consecutive cells excluding zeros (even when they all contain zeros)
    By pao13 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-05-2012, 04:32 PM

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