#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PAL PAL is offline
external usenet poster
 
Posts: 200
Default Conditional

I am working on a big array formula that currently works great.

=AVERAGE(IF(('Export and Site View'!$M$2:$M$282=$K$4)*('Export and Site
View'!$C$2:$C$282=$A$2)*('Export and Site
View'!$H$2:$H$282="Active")*('Export and Site View'!$N$2:$N$2820),('Export
and Site View'!$N$2:$N$282),""))

The first condition = $K$4 references a field with a year (ie. 2007). How
can I change the condition to reference 2006 and 2007. I am looking to return
a values that look up two years. Do I have to add an OR Condition? If so
where?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Conditional

Change

=AVERAGE(IF((('Export and Site View'!$M$2:$M$282=$K$4)+('Export and Site
View'!$M$2:$M$282=$K$3))*('Export and Site View'!$C$2:$C$282=$A$2)*('Export and Site
View'!$H$2:$H$282="Active")*('Export and Site View'!$N$2:$N$2820),('Export and Site
View'!$N$2:$N$282),""))

Enter 2006 into cell K3, and 2007 into K4.

HTH,
Bernie
MS Excel MVP


"PAL" wrote in message
...
I am working on a big array formula that currently works great.

=AVERAGE(IF(('Export and Site View'!$M$2:$M$282=$K$4)*('Export and Site
View'!$C$2:$C$282=$A$2)*('Export and Site
View'!$H$2:$H$282="Active")*('Export and Site View'!$N$2:$N$2820),('Export
and Site View'!$N$2:$N$282),""))

The first condition = $K$4 references a field with a year (ie. 2007). How
can I change the condition to reference 2006 and 2007. I am looking to return
a values that look up two years. Do I have to add an OR Condition? If so
where?

Thanks.



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

Try this:

K4 = 2006

=AVERAGE(IF(('Export and Site View'!$M$2:$M$282=$K$4+{0,1}).......

--
Biff
Microsoft Excel MVP


"PAL" wrote in message
...
I am working on a big array formula that currently works great.

=AVERAGE(IF(('Export and Site View'!$M$2:$M$282=$K$4)*('Export and Site
View'!$C$2:$C$282=$A$2)*('Export and Site
View'!$H$2:$H$282="Active")*('Export and Site
View'!$N$2:$N$2820),('Export
and Site View'!$N$2:$N$282),""))

The first condition = $K$4 references a field with a year (ie. 2007). How
can I change the condition to reference 2006 and 2007. I am looking to
return
a values that look up two years. Do I have to add an OR Condition? If so
where?

Thanks.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Conditional

PAL,

I should have noted that in Array formulas, Multiplication is the equivalent of logical AND,
Addition (within parens) is the equivalent of logical OR.

HTH,
Bernie
MS Excel MVP


"PAL" wrote in message
...
I am working on a big array formula that currently works great.

=AVERAGE(IF(('Export and Site View'!$M$2:$M$282=$K$4)*('Export and Site
View'!$C$2:$C$282=$A$2)*('Export and Site
View'!$H$2:$H$282="Active")*('Export and Site View'!$N$2:$N$2820),('Export
and Site View'!$N$2:$N$282),""))

The first condition = $K$4 references a field with a year (ie. 2007). How
can I change the condition to reference 2006 and 2007. I am looking to return
a values that look up two years. Do I have to add an OR Condition? If so
where?

Thanks.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Conditional

Not sure why, but that counts 2006 values twice when averaging.....

Bernie
MS Excel MVP


"T. Valko" wrote in message ...
Try this:

K4 = 2006

=AVERAGE(IF(('Export and Site View'!$M$2:$M$282=$K$4+{0,1}).......

--
Biff
Microsoft Excel MVP


"PAL" wrote in message
...
I am working on a big array formula that currently works great.

=AVERAGE(IF(('Export and Site View'!$M$2:$M$282=$K$4)*('Export and Site
View'!$C$2:$C$282=$A$2)*('Export and Site
View'!$H$2:$H$282="Active")*('Export and Site View'!$N$2:$N$2820),('Export
and Site View'!$N$2:$N$282),""))

The first condition = $K$4 references a field with a year (ie. 2007). How
can I change the condition to reference 2006 and 2007. I am looking to return
a values that look up two years. Do I have to add an OR Condition? If so
where?

Thanks.







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

Hmmm...

Works in all my tests:

http://img503.imageshack.us/img503/7786/averagenr1.jpg


--
Biff
Microsoft Excel MVP


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Not sure why, but that counts 2006 values twice when averaging.....

Bernie
MS Excel MVP


"T. Valko" wrote in message
...
Try this:

K4 = 2006

=AVERAGE(IF(('Export and Site View'!$M$2:$M$282=$K$4+{0,1}).......

--
Biff
Microsoft Excel MVP


"PAL" wrote in message
...
I am working on a big array formula that currently works great.

=AVERAGE(IF(('Export and Site View'!$M$2:$M$282=$K$4)*('Export and Site
View'!$C$2:$C$282=$A$2)*('Export and Site
View'!$H$2:$H$282="Active")*('Export and Site
View'!$N$2:$N$2820),('Export
and Site View'!$N$2:$N$282),""))

The first condition = $K$4 references a field with a year (ie. 2007).
How
can I change the condition to reference 2006 and 2007. I am looking to
return
a values that look up two years. Do I have to add an OR Condition? If
so
where?

Thanks.







  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Conditional


Of course, now it works - I deleted the workbook with the weird results, and cannot replicate it.

Sorry,

Bernie
MS Excel MVP


"T. Valko" wrote in message ...
Hmmm...

Works in all my tests:

http://img503.imageshack.us/img503/7786/averagenr1.jpg


--
Biff
Microsoft Excel MVP


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Not sure why, but that counts 2006 values twice when averaging.....

Bernie
MS Excel MVP


"T. Valko" wrote in message
...
Try this:

K4 = 2006

=AVERAGE(IF(('Export and Site View'!$M$2:$M$282=$K$4+{0,1}).......

--
Biff
Microsoft Excel MVP


"PAL" wrote in message
...
I am working on a big array formula that currently works great.

=AVERAGE(IF(('Export and Site View'!$M$2:$M$282=$K$4)*('Export and Site
View'!$C$2:$C$282=$A$2)*('Export and Site
View'!$H$2:$H$282="Active")*('Export and Site View'!$N$2:$N$2820),('Export
and Site View'!$N$2:$N$282),""))

The first condition = $K$4 references a field with a year (ie. 2007). How
can I change the condition to reference 2006 and 2007. I am looking to return
a values that look up two years. Do I have to add an OR Condition? If so
where?

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
conditional sum ?? Kevin Excel Worksheet Functions 2 September 28th 07 06:43 PM
Conditional Rank (or rather, Conditional Range) [email protected] Excel Worksheet Functions 6 April 16th 07 06:15 PM
Is IF() Conditional the way to do this? Lorne Oliver Excel Worksheet Functions 9 July 5th 06 06:47 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM
Conditional sum PO Excel Worksheet Functions 1 January 4th 05 03:51 PM


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