Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 123
Default Averaging, but excluding zeros

i have weekly inventory in a spreadsheet....but the columns are not right
next to eachother...for example columns a, c, e, and g have
inventory.....Sales may be in column b,d,f and h. I need a formula in column
z that averages a,c,e and g. But if the inventory is zero, don't average it.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Averaging, but excluding zeros

=AVERAGE(IF((A2:G7<0)*(MOD(COLUMN(A2:G7),2)=1),A2 :G7))

ctrl+shift+enter, not just enter

Adjust your range to suit



"Tami" wrote:

i have weekly inventory in a spreadsheet....but the columns are not right
next to eachother...for example columns a, c, e, and g have
inventory.....Sales may be in column b,d,f and h. I need a formula in column
z that averages a,c,e and g. But if the inventory is zero, don't average it.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 123
Default Averaging, but excluding zeros

thanks, i'll try it!

"Teethless mama" wrote:

=AVERAGE(IF((A2:G7<0)*(MOD(COLUMN(A2:G7),2)=1),A2 :G7))

ctrl+shift+enter, not just enter

Adjust your range to suit



"Tami" wrote:

i have weekly inventory in a spreadsheet....but the columns are not right
next to eachother...for example columns a, c, e, and g have
inventory.....Sales may be in column b,d,f and h. I need a formula in column
z that averages a,c,e and g. But if the inventory is zero, don't average it.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Averaging, but excluding zeros

Tami wrote...
i have weekly inventory in a spreadsheet....but the columns are not right
next to eachother...for example columns a, c, e, and g have
inventory.....Sales may be in column b,d,f and h. *I need a formula in column
z that averages a,c,e and g. But if the inventory is zero, don't average it.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Averaging, but excluding zeros

Hi,

It is not clear from your question whether you are trying to do this
separately for each row or for the entire columns, here is a similar idea for
a row by row average. Note you can change it to a column average by just
changing G2 to G20 or whatever.

=AVERAGE(IF(A2:G2*(MOD(COLUMN(A2:G2),2)=1)<0,A2:G 2))

this is an array formula so you need to press Shift+Ctrl+Enter

If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Tami" wrote:

i have weekly inventory in a spreadsheet....but the columns are not right
next to eachother...for example columns a, c, e, and g have
inventory.....Sales may be in column b,d,f and h. I need a formula in column
z that averages a,c,e and g. But if the inventory is zero, don't average it.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Averaging, but excluding zeros



"Shane Devenshire" wrote:

Hi,

It is not clear from your question whether you are trying to do this
separately for each row or for the entire columns, here is a similar idea for
a row by row average. Note you can change it to a column average by just
changing G2 to G20 or whatever.

=AVERAGE(IF(A2:G2*(MOD(COLUMN(A2:G2),2)=1)<0,A2:G 2))

this is an array formula so you need to press Shift+Ctrl+Enter

If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Tami" wrote:

i have weekly inventory in a spreadsheet....but the columns are not right
next to eachother...for example columns a, c, e, and g have
inventory.....Sales may be in column b,d,f and h. I need a formula in column
z that averages a,c,e and g. But if the inventory is zero, don't average it.

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
Averaging numbers in a column while excluding blank spaces and zer c. murphy Excel Worksheet Functions 4 March 3rd 09 03:23 AM
averaging separate cells in excel excluding 0 values Hopless & Challenged Excel Discussion (Misc queries) 2 July 9th 08 10:13 AM
Averaging excluding blanks--Multiple Tabs DaS Excel Worksheet Functions 2 June 17th 08 05:03 PM
Averaging excluding min and max numbers n_gineer Excel Worksheet Functions 3 January 12th 06 03:32 PM
Averaging with zeros NOT Tom Excel Discussion (Misc queries) 5 August 18th 05 07:34 PM


All times are GMT +1. The time now is 04:33 PM.

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

About Us

"It's about Microsoft Excel"