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

I have a worksheet with 2 tabs, Sheet 1 is to be used to display the data I
have on Sheet 2. I named Sheet 2 data and have the following columns:

Dealer Quantity on Invoice Description
Dealer A 1 Product A
Dealer B 1 Product B
Dealer A 1 Product A
Dealer B 1 Product A

On Sheet 1 I created a list in cell A1 so I could select my Dealer. On
Sheet 1 I have a list of the products starting in cell A21. I want to add
quantity sold based on cell A1 that has the dealer's name (thereby compiling
all the dealer's branches into 1) and by product determine what we've sold
them.

So, if A1=data!A:A and A21=data!C:C then sum all that matches in column
data!B:B and return that amount. I've tried sumif with and statements but I
just can't get it right. The closest I've come is
=SUM(IF(AND(($A$1=data!A:A),(Sheet1!A21=data!C:C)) ,data!B:B)) comes back at
least with a 0 and not an error message, what am I doing wrong.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Sum if two conditions met

=SUM(IF(AND(($A$1=data!A:A),(Sheet1!A21=data!C:C)) ,data!B:B))

You can not use a whole column unless you have XL-2007, use "*" instead of
"AND"

Try it like this:

=SUM(IF(($A$1=data!A1:A100)*(Sheet1!A21=data!C1:C1 00),data!B1:B100))

Ctrl+shift+Enter, not just Enter
Adjust your range to suit


"doubleD" wrote:

I have a worksheet with 2 tabs, Sheet 1 is to be used to display the data I
have on Sheet 2. I named Sheet 2 data and have the following columns:

Dealer Quantity on Invoice Description
Dealer A 1 Product A
Dealer B 1 Product B
Dealer A 1 Product A
Dealer B 1 Product A

On Sheet 1 I created a list in cell A1 so I could select my Dealer. On
Sheet 1 I have a list of the products starting in cell A21. I want to add
quantity sold based on cell A1 that has the dealer's name (thereby compiling
all the dealer's branches into 1) and by product determine what we've sold
them.

So, if A1=data!A:A and A21=data!C:C then sum all that matches in column
data!B:B and return that amount. I've tried sumif with and statements but I
just can't get it right. The closest I've come is
=SUM(IF(AND(($A$1=data!A:A),(Sheet1!A21=data!C:C)) ,data!B:B)) comes back at
least with a 0 and not an error message, what am I doing wrong.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Sum if two conditions met

I copied the formula into my spreadsheet and selected the actual column range
and it still came back with 0's as the result when I know the dealer
purchased items.

=SUM(IF(($A$1=data!A2:A1250)*(Sheet1!A21=data!C2:C 1250),data!B2:B1250))

"Teethless mama" wrote:

=SUM(IF(AND(($A$1=data!A:A),(Sheet1!A21=data!C:C)) ,data!B:B))


You can not use a whole column unless you have XL-2007, use "*" instead of
"AND"

Try it like this:

=SUM(IF(($A$1=data!A1:A100)*(Sheet1!A21=data!C1:C1 00),data!B1:B100))

Ctrl+shift+Enter, not just Enter
Adjust your range to suit


"doubleD" wrote:

I have a worksheet with 2 tabs, Sheet 1 is to be used to display the data I
have on Sheet 2. I named Sheet 2 data and have the following columns:

Dealer Quantity on Invoice Description
Dealer A 1 Product A
Dealer B 1 Product B
Dealer A 1 Product A
Dealer B 1 Product A

On Sheet 1 I created a list in cell A1 so I could select my Dealer. On
Sheet 1 I have a list of the products starting in cell A21. I want to add
quantity sold based on cell A1 that has the dealer's name (thereby compiling
all the dealer's branches into 1) and by product determine what we've sold
them.

So, if A1=data!A:A and A21=data!C:C then sum all that matches in column
data!B:B and return that amount. I've tried sumif with and statements but I
just can't get it right. The closest I've come is
=SUM(IF(AND(($A$1=data!A:A),(Sheet1!A21=data!C:C)) ,data!B:B)) comes back at
least with a 0 and not an error message, what am I doing wrong.

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Sum if two conditions met

Don't forget to press CTRL+SHIFT+ENTER, not just ENTER. When you do it right
it will put the curly brackets around the formula.


"doubleD" wrote:

I copied the formula into my spreadsheet and selected the actual column range
and it still came back with 0's as the result when I know the dealer
purchased items.

=SUM(IF(($A$1=data!A2:A1250)*(Sheet1!A21=data!C2:C 1250),data!B2:B1250))

"Teethless mama" wrote:

=SUM(IF(AND(($A$1=data!A:A),(Sheet1!A21=data!C:C)) ,data!B:B))


You can not use a whole column unless you have XL-2007, use "*" instead of
"AND"

Try it like this:

=SUM(IF(($A$1=data!A1:A100)*(Sheet1!A21=data!C1:C1 00),data!B1:B100))

Ctrl+shift+Enter, not just Enter
Adjust your range to suit


"doubleD" wrote:

I have a worksheet with 2 tabs, Sheet 1 is to be used to display the data I
have on Sheet 2. I named Sheet 2 data and have the following columns:

Dealer Quantity on Invoice Description
Dealer A 1 Product A
Dealer B 1 Product B
Dealer A 1 Product A
Dealer B 1 Product A

On Sheet 1 I created a list in cell A1 so I could select my Dealer. On
Sheet 1 I have a list of the products starting in cell A21. I want to add
quantity sold based on cell A1 that has the dealer's name (thereby compiling
all the dealer's branches into 1) and by product determine what we've sold
them.

So, if A1=data!A:A and A21=data!C:C then sum all that matches in column
data!B:B and return that amount. I've tried sumif with and statements but I
just can't get it right. The closest I've come is
=SUM(IF(AND(($A$1=data!A:A),(Sheet1!A21=data!C:C)) ,data!B:B)) comes back at
least with a 0 and not an error message, what am I doing wrong.

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
More than 3 Conditions??? gib21 Excel Worksheet Functions 9 May 26th 09 05:37 PM
Countif Conditions - Use of conditions that vary by cell value JonTarg Excel Discussion (Misc queries) 1 May 30th 08 01:21 PM
2 Conditions + Sum of a colum matching those conditions Jeffa Excel Worksheet Functions 5 June 8th 07 12:14 AM
shade cells based on conditions - i have more than 3 conditions Mo2 Excel Worksheet Functions 3 March 30th 07 07:19 AM
How to multiple conditions to validate more than 2 conditions to . Bhuvana Govind Excel Worksheet Functions 1 January 28th 05 07:07 PM


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