Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Work sheet function -average

Hi ,please help a newbie.
I need the average of cells A1:A5 in A6 , but some cells may be blank.
Please explain if you can. Thanks

Sunil


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Work sheet function -average

Sunil
the Average function would be
=average(A1:A5) or in vba myAve = WorksheetFunction.Average(Range("A1:A5"))
to get the average ignoring blanks try
=sum(A1:A5)/counta(A1:A5)
or
myAve =
WorksheetFunction.Sum(Range("A1:A5"))/WorksheetFunction.CountA(Range("A1:A5"
))

SUNIL wrote in message
...
Hi ,please help a newbie.
I need the average of cells A1:A5 in A6 , but some cells may be blank.
Please explain if you can. Thanks

Sunil




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Work sheet function -average


Hi Loomah,

to get the average ignoring blanks try
=sum(A1:A5)/counta(A1:A5)


Excel's Average function ignores blank cells by design.

---
Regards,
Norman



"Loomah" <bellm AT globalnet dot co dot uk wrote in message
...
Sunil
the Average function would be
=average(A1:A5) or in vba myAve =
WorksheetFunction.Average(Range("A1:A5"))
to get the average ignoring blanks try
=sum(A1:A5)/counta(A1:A5)
or
myAve =
WorksheetFunction.Sum(Range("A1:A5"))/WorksheetFunction.CountA(Range("A1:A5"
))

SUNIL wrote in message
...
Hi ,please help a newbie.
I need the average of cells A1:A5 in A6 , but some cells may be blank.
Please explain if you can. Thanks

Sunil






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
need a function that will work using multiple work books and sheet capt c Excel Worksheet Functions 1 March 30th 09 10:20 PM
Can you enter a function or format to add a row to a work sheet? Tracy Excel Worksheet Functions 4 October 21st 06 02:41 PM
how does the AVERAGE function work? Dave F Excel Discussion (Misc queries) 5 September 13th 06 07:58 PM
Am I able to protect my work sheet and keep my grouping function? Djana Excel Worksheet Functions 1 May 31st 06 01:44 AM
How do I protect sheet, but allow "group" function to work dwsmha Excel Discussion (Misc queries) 1 August 29th 05 11:25 PM


All times are GMT +1. The time now is 12:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"