Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 177
Default Averaging two if statements

I am working on sales bonuses in a sales tracking sheet. It is setup as
follows:

Column G H L O
21 DP $5,000 S
23 AF $10,000 S
I want to average column L if G=21, H=DP, and O=S. I entered:
Average(IF((G2:G100=U2),--(H2:H100=V3),L2:L100) (CTRL, SHIFT, ENTER).

The U2 and V3 are refrencing cells where I have put 21,23 and DP or AF as to
not make them equal "DP" or 21. I have also used the "DP" or 21 in the
equation. I cannot figure this out. Please help me.
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 210
Default Averaging two if statements

Todd,

You should be able to structure it using concatenation:

=average(if(g2:g100&h2:h100&l2:l100=u2&v3&"S",aver age_rng,""))

Ensure you press shift-control-enter

Replace average_rng with the range that will be averaged.
--
http://HelpExcel.com




"Todd" wrote:

I am working on sales bonuses in a sales tracking sheet. It is setup as
follows:

Column G H L O
21 DP $5,000 S
23 AF $10,000 S
I want to average column L if G=21, H=DP, and O=S. I entered:
Average(IF((G2:G100=U2),--(H2:H100=V3),L2:L100) (CTRL, SHIFT, ENTER).

The U2 and V3 are refrencing cells where I have put 21,23 and DP or AF as to
not make them equal "DP" or 21. I have also used the "DP" or 21 in the
equation. I cannot figure this out. Please help me.
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Averaging two if statements

=AVERAGE(IF((G2:G100=U2)*(H2:H100=V3),L2:L100))
ctrl+shift+enter, not just enter

"Todd" wrote:

I am working on sales bonuses in a sales tracking sheet. It is setup as
follows:

Column G H L O
21 DP $5,000 S
23 AF $10,000 S
I want to average column L if G=21, H=DP, and O=S. I entered:
Average(IF((G2:G100=U2),--(H2:H100=V3),L2:L100) (CTRL, SHIFT, ENTER).

The U2 and V3 are refrencing cells where I have put 21,23 and DP or AF as to
not make them equal "DP" or 21. I have also used the "DP" or 21 in the
equation. I cannot figure this out. Please help me.
Thanks

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 176
Default Averaging two if statements

=AVERAGE(IF((G2:G100=U2)*(H2:H100=V3)*(O2:O100="S" ),L2:L100,""))
Still entered with CTRL+SHIFT+ENTER.


--
Regards,
Dave


"Todd" wrote:

I am working on sales bonuses in a sales tracking sheet. It is setup as
follows:

Column G H L O
21 DP $5,000 S
23 AF $10,000 S
I want to average column L if G=21, H=DP, and O=S. I entered:
Average(IF((G2:G100=U2),--(H2:H100=V3),L2:L100) (CTRL, SHIFT, ENTER).

The U2 and V3 are refrencing cells where I have put 21,23 and DP or AF as to
not make them equal "DP" or 21. I have also used the "DP" or 21 in the
equation. I cannot figure this out. Please help me.
Thanks

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default Averaging two if statements

Hi Todd

Try the non-array entered Sumproduct formula as follows

=SUMPRODUCT((G2:G100=U2)*(H2:H100=V3)*L2:L100)/
SUMPRODUCT((G2:G100=U2)*(H2:H100=V3))

--
Regards

Roger Govier


"Todd" wrote in message
...
I am working on sales bonuses in a sales tracking sheet. It is setup
as
follows:

Column G H L O
21 DP $5,000 S
23 AF $10,000 S
I want to average column L if G=21, H=DP, and O=S. I entered:
Average(IF((G2:G100=U2),--(H2:H100=V3),L2:L100) (CTRL, SHIFT, ENTER).

The U2 and V3 are refrencing cells where I have put 21,23 and DP or AF
as to
not make them equal "DP" or 21. I have also used the "DP" or 21 in
the
equation. I cannot figure this out. Please help me.
Thanks





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 177
Default Averaging two if statements

I did not know you could use a concentration. Worked great and I will give
you a reply. Thank you very much.
Todd

"galimi" wrote:

Todd,

You should be able to structure it using concatenation:

=average(if(g2:g100&h2:h100&l2:l100=u2&v3&"S",aver age_rng,""))

Ensure you press shift-control-enter

Replace average_rng with the range that will be averaged.
--
http://HelpExcel.com




"Todd" wrote:

I am working on sales bonuses in a sales tracking sheet. It is setup as
follows:

Column G H L O
21 DP $5,000 S
23 AF $10,000 S
I want to average column L if G=21, H=DP, and O=S. I entered:
Average(IF((G2:G100=U2),--(H2:H100=V3),L2:L100) (CTRL, SHIFT, ENTER).

The U2 and V3 are refrencing cells where I have put 21,23 and DP or AF as to
not make them equal "DP" or 21. I have also used the "DP" or 21 in the
equation. I cannot figure this out. Please help me.
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
Multiple IF statements or a better method ? Bob Moore Excel Discussion (Misc queries) 4 November 25th 06 01:20 AM
2 IF Statements not mutually exclusive Bev Excel Discussion (Misc queries) 2 August 24th 06 05:23 AM
UDFunctions and nested If-the-else statements JDB Excel Worksheet Functions 1 January 25th 06 03:29 PM
Linking two IF statements together trixma Excel Discussion (Misc queries) 2 September 29th 05 06:07 AM
Changing the range of several averaging functions Hellion Excel Discussion (Misc queries) 1 September 17th 05 02:12 PM


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