ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   formula or function? (https://www.excelbanter.com/excel-discussion-misc-queries/117257-formula-function.html)

grok

formula or function?
 
I'd like to have a macro that will compute the average of the non-blank
elements in a column. Should I use a formula or a function for the
calculating part?

Bernard Liengme

formula or function?
 
Have you tried entering, for example:
2, blank, 3, blank, 4, blank in A1:A4 and using the formula =AVERAGE(A1:A4)
?
If you try this you will find that AVERAGE ignores blanks

Note we have a formula - it begins with =
But our formula incorporates a function - AVERAGE

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"grok" wrote in message
...
I'd like to have a macro that will compute the average of the non-blank
elements in a column. Should I use a formula or a function for the
calculating part?





All times are GMT +1. The time now is 06:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com