Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PAL PAL is offline
external usenet poster
 
Posts: 200
Default Conditional w/ arrays

I am trying to get the average of several numbers using arrays. I want
average only if the date with the values are associated with a date range.

{=AVERAGE(IF(AND($E$2:$E$6<I6,$E$2:$E$6<I5),$D$2:$ D$6,""))}


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Conditional w/ arrays

I've never seen AND and OR work in an array formula. You can get around this
by using multiplication for AND and addition for OR:
=AVERAGE(IF(($E$2:$E$6<I6)*($E$2:$E$6<I5),$D$2:$D$ 6,""))

although I think you could write the formula as
=AVERAGE(IF($E$2:$E$6<MIN(I6,I5),$D$2:$D$6,""))


"PAL" wrote:

I am trying to get the average of several numbers using arrays. I want
average only if the date with the values are associated with a date range.

{=AVERAGE(IF(AND($E$2:$E$6<I6,$E$2:$E$6<I5),$D$2:$ D$6,""))}


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Conditional w/ arrays

Try this. (array entered)

I assume the dates to average are inclusive of the dates in I5:I6.

=AVERAGE(IF((E2:E6=I5)*(E2:E6<=I6),D2:D6))

--
Biff
Microsoft Excel MVP


"PAL" wrote in message
...
I am trying to get the average of several numbers using arrays. I want
average only if the date with the values are associated with a date range.

{=AVERAGE(IF(AND($E$2:$E$6<I6,$E$2:$E$6<I5),$D$2:$ D$6,""))}




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
Use of arrays Dave F Excel Worksheet Functions 0 November 30th 06 04:26 PM
Use of arrays DKS Excel Worksheet Functions 0 November 30th 06 04:11 PM
Fantasy Football Conditional Arrays altopalo Excel Worksheet Functions 4 May 8th 06 05:08 AM
Need help with arrays (I think) rbhedal Excel Worksheet Functions 3 October 19th 05 07:24 AM
Arrays Dan Excel Worksheet Functions 3 September 15th 05 07:36 AM


All times are GMT +1. The time now is 07:40 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"