Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Ludwig Fischer   on Sep 19 In MS Office Category.

  
Question Answered By: Whitney Cruz   on Sep 19

I'm not sure where you are having trouble  or why you want a different way of
counting values, but some comments on your code ...

Your For Each loop is looking at every cell in the range, yet your NumValues
is taken from a count  of just the rows. This will not do what you want if
the range is wider than one column. You should be able to use the Count
attribute against the range itself to get the actual number  of cells in the
range.

But you say "values". Do you want not to count empty cells? Look at
CountA.

You don't need a loop to sum  a range. There is a Sum function. There is
also an Average function.

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Average Macro Help Or get search suggestion and latest updates.


Tagged: