#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 328
Default Array

This is what I'm trying to do, but it wont work. I have a workbook with over
500 entries and my formula is an array. Is there a way to do the arrays w/o
having to do the Ctrl+Shift+Enter each time?

Example:
0 5 5 my formula is =AVERAGE(IF(a2:c2<0,a2:c2,""))

Also, is there a way to make the array return 0 if all the columns are 0? I
can't seem to get it to work.

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Array

=IF(COUNTIF(A2:C2,0)=3,0,SUMPRODUCT(--(A2:C2<0),A2:C2)/COUNTIF(A2:C2,"<0"))

------------------
mama no teeth

"Lisa" wrote:

This is what I'm trying to do, but it wont work. I have a workbook with over
500 entries and my formula is an array. Is there a way to do the arrays w/o
having to do the Ctrl+Shift+Enter each time?

Example:
0 5 5 my formula is =AVERAGE(IF(a2:c2<0,a2:c2,""))

Also, is there a way to make the array return 0 if all the columns are 0? I
can't seem to get it to work.

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Array

You could leave out the test for 0 when summing.
=IF(COUNTIF(A2:C2,0)=3,0,SUM(A2:C2)/COUNTIF(A2:C2,"<0"))


"Nobody" wrote:

=IF(COUNTIF(A2:C2,0)=3,0,SUMPRODUCT(--(A2:C2<0),A2:C2)/COUNTIF(A2:C2,"<0"))

------------------
mama no teeth

"Lisa" wrote:

This is what I'm trying to do, but it wont work. I have a workbook with over
500 entries and my formula is an array. Is there a way to do the arrays w/o
having to do the Ctrl+Shift+Enter each time?

Example:
0 5 5 my formula is =AVERAGE(IF(a2:c2<0,a2:c2,""))

Also, is there a way to make the array return 0 if all the columns are 0? I
can't seem to get it to work.

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Array

Actually, I think the first conditional test could also be left out and use
MAX to avoid DIV/0 errors
=SUM(A3:C3)/MAX(COUNTIF(A3:C3,"<0"),1)

"JMB" wrote:

You could leave out the test for 0 when summing.
=IF(COUNTIF(A2:C2,0)=3,0,SUM(A2:C2)/COUNTIF(A2:C2,"<0"))


"Nobody" wrote:

=IF(COUNTIF(A2:C2,0)=3,0,SUMPRODUCT(--(A2:C2<0),A2:C2)/COUNTIF(A2:C2,"<0"))

------------------
mama no teeth

"Lisa" wrote:

This is what I'm trying to do, but it wont work. I have a workbook with over
500 entries and my formula is an array. Is there a way to do the arrays w/o
having to do the Ctrl+Shift+Enter each time?

Example:
0 5 5 my formula is =AVERAGE(IF(a2:c2<0,a2:c2,""))

Also, is there a way to make the array return 0 if all the columns are 0? I
can't seem to get it to work.

Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 328
Default Array

I dont think that would work since the 0s are still there. But I figured
out....light bulb just goes off...here's my formula:

=IF(K2+L2+M2=0,0,(AVERAGE(IF(K2:M20,K2:M2,""))))

Thanks for the quick response:

"Lisa" wrote:

This is what I'm trying to do, but it wont work. I have a workbook with over
500 entries and my formula is an array. Is there a way to do the arrays w/o
having to do the Ctrl+Shift+Enter each time?

Example:
0 5 5 my formula is =AVERAGE(IF(a2:c2<0,a2:c2,""))

Also, is there a way to make the array return 0 if all the columns are 0? I
can't seem to get it to work.

Thanks!



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
Display an array of references andy62 Excel Worksheet Functions 1 July 6th 06 03:36 AM
Transpose words and numbers into array of different proportions Manfred Excel Discussion (Misc queries) 5 February 9th 06 01:07 AM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM
VBA Import of text file & Array parsing of that data Dennis Excel Discussion (Misc queries) 4 November 28th 04 10:20 PM


All times are GMT +1. The time now is 01:41 AM.

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"