Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default Sumproduct based on certain criteria

Hi All,
I have data with 6 columns and more than 2500 rows. I want to find the
average of column "F" if all the other columns fulfill certain conditions.

Auto AAAC22 John 2 3 45.62
Auto AAAC22 John 2 3 13.1
Auto AAAC24 Kelly 6 3 14.5
Auto BAAC25 John 2 1 15
Manual AAAC26 John 2 3 15.24
Auto AXAC22 John 5 3 45.62
Auto AAAC28 Kelly 1 1 15.55
Manual AAAC22 John 2 3 45.62
Auto AAAC22 John 2 3 16.72

I would like to know a formula that calculates the average of 'F' if A=Auto,
B=Starts with letter 'A' and C=John.

I tried the formual
=sumproduct(--(a$2:a$9999="auto"),--(B$2:B$9999="A?????")--(C$2:C$9999="John"),f$2:F$9999).
but its not working. Could you please help me on this formula..

Thanks in advance

--
Karthi
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default Sumproduct based on certain criteria

Hi All,
I have data with 6 columns and more than 2500 rows. I want to find the
average of column "F" if all the other columns fulfill certain conditions.

Auto AAAC22 John 2 3 45.62
Auto AAAC22 John 2 3 13.1
Auto AAAC24 Kelly 6 3 14.5
Auto BAAC25 John 2 1 15
Manual AAAC26 John 2 3 15.24
Auto AXAC22 John 5 3 45.62
Auto AAAC28 Kelly 1 1 15.55
Manual AAAC22 John 2 3 45.62
Auto CAAC22 John 2 3 16.72

I would like to know a formula that calculates the average of 'F' if A=Auto,
B=Starts with letter 'A' or 'B' and C=John.

I tried the formual
=sumproduct(--(a$2:a$9999="auto"),--(B$2:B$9999="A?????")--(C$2:C$9999="John"),f$2:F$9999).
but its not working. Could you please help me on this formula..

Thanks in advance

--
Karthi

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Sumproduct based on certain criteria

Try this array formula** :

=AVERAGE(IF((A2:A10="auto")*(LEFT(B2:B10)={"A","B" })*(C2:C10="John"),F2:F10))

Better to use cells to hold the criteria:

H2 = auto
I2 = A
J2 = B
K2 = John

=AVERAGE(IF((A2:A10=H2)*(LEFT(B2:B10)=I2:J2)*(C2:C 10=K2),F2:F10))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

You might want to consider using AutoFilter and SUBTOTAL.

--
Biff
Microsoft Excel MVP


"Karthik" wrote in message
...
Hi All,
I have data with 6 columns and more than 2500 rows. I want to find the
average of column "F" if all the other columns fulfill certain conditions.

Auto AAAC22 John 2 3 45.62
Auto AAAC22 John 2 3 13.1
Auto AAAC24 Kelly 6 3 14.5
Auto BAAC25 John 2 1 15
Manual AAAC26 John 2 3 15.24
Auto AXAC22 John 5 3 45.62
Auto AAAC28 Kelly 1 1 15.55
Manual AAAC22 John 2 3 45.62
Auto AAAC22 John 2 3 16.72

I would like to know a formula that calculates the average of 'F' if
A=Auto,
B=Starts with letter 'A' and C=John.

I tried the formual
=sumproduct(--(a$2:a$9999="auto"),--(B$2:B$9999="A?????")--(C$2:C$9999="John"),f$2:F$9999).
but its not working. Could you please help me on this formula..

Thanks in advance

--
Karthi



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 703
Default Sumproduct based on certain criteria

Hi
Use an unused column as helper column to extract the first letter in
Col B.

In this example I use column G as helper column.

Enter this formula in G2 and copy down:

=Left(B2,1)

Now use this formula to calculate the average:

=SUMPRODUCT(--(A$2:A$9999="Auto"),--(G$2:G$9999="A"),--(C$2:C
$9999="John"),F$2:F$9999)

Hopes this helps

---
Per


On 6 Feb., 02:41, Karthik wrote:
Hi All,
I have data with 6 columns and more than 2500 rows. *I want to find the
average of column "F" if all the other columns fulfill certain conditions..

Auto * *AAAC22 *John * *2 * * * 3 * * * 45.62
Auto * *AAAC22 *John * *2 * * * 3 * * * 13.1
Auto * *AAAC24 *Kelly * 6 * * * 3 * * * 14.5
Auto * *BAAC25 *John * *2 * * * 1 * * * 15
Manual *AAAC26 *John * *2 * * * 3 * * * 15.24
Auto * *AXAC22 *John * *5 * * * 3 * * * 45.62
Auto * *AAAC28 *Kelly * 1 * * * 1 * * * 15.55
Manual *AAAC22 *John * *2 * * * 3 * * * 45.62
Auto * *AAAC22 *John * *2 * * * 3 * * * 16.72

I would like to know a formula that calculates the average of 'F' if A=Auto,
B=Starts with letter 'A' and C=John.

I tried the formual
=sumproduct(--(a$2:a$9999="auto"),--(B$2:B$9999="A?????")--(C$2:C$9999="Joh*n"),f$2:F$9999).
but its not working. Could you please help me on this formula..

Thanks in advance

--
Karthi


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
Average / sumproduct based on multiple criteria Anto111 Excel Discussion (Misc queries) 3 July 8th 08 07:46 AM
Sumproduct based which also weights data based on date ExcelMonkey Excel Worksheet Functions 6 February 4th 07 08:51 AM
IF-based SUMPRODUCT criteria creativeops Excel Discussion (Misc queries) 4 January 18th 07 05:36 PM
Sumproduct 4 criteria Alok Excel Worksheet Functions 0 November 30th 06 12:47 AM
sumproduct 2 columns based on criteria in 3rd column excel guru i''m not Excel Discussion (Misc queries) 5 December 31st 05 03:47 PM


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