Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
need a function that will work using multiple work books and sheet | Excel Worksheet Functions | |||
Can you enter a function or format to add a row to a work sheet? | Excel Worksheet Functions | |||
how does the AVERAGE function work? | Excel Discussion (Misc queries) | |||
Am I able to protect my work sheet and keep my grouping function? | Excel Worksheet Functions | |||
How do I protect sheet, but allow "group" function to work | Excel Discussion (Misc queries) |