Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

excel VBA question

 
Jackie Wang
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ColumnA ColumnB
#N/A=myaverage(A1:A5)
#N/A=myaverage(A1:A5)
3=myaverage(A1:A5)
5=myaverage(A1:A5)
0=myaverage(A1:A5)

Function name: MyAverage
Input: the array of the above 5 cell (I hope i can be dynamic)
output: average of the non #NA cell. In this case 2.3333
Can anyone shed some light to write this little macro
 
Sameer Jamal
Ranch Hand
Posts: 1870
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic