Multi variables in sum if , not working.!?

Ando999

New Member
Joined
Jan 9, 2012
Messages
11
Hi
I want to run a table whereby it looks at 2 variables from a data list and populate a table. Eg see below. I want the formulae to look up the spend figure where a match to say Car 1 and Green ( ie 3). Any advice? SUMIF not working!
Thanks alot


Table
Car Type Colour Spend GreenRedOrange
Car 1Green3 Car 1
Car 2Red4 Car 2
Car 2Red2 Car 3
Car 3Blue 1
Car 1Orange2

<COLGROUP><COL style="WIDTH: 116pt; mso-width-source: userset; mso-width-alt: 5668" width=155><COL style="WIDTH: 48pt" span=8 width=64><TBODY>
</TBODY>
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Which version of Excel do you have?
If you have 2007 or higher, you can use SUMIFS

=SUMIFS($C$2:$C$6,$A$2:$A$6,$E2,$B$2:$B$6,F$1)

A2:A6 = Car Types
B2:B6 = Colors
C2:C6 = Spend
E2 = Car Type to look for
F1 = Color to look for
 
Upvote 0
SumIf - multi variables

Hi

I want to know formula to allow 2 variables to drive my table based on data table. On example I want to know by colour and car type the spend. Ive tried sumif but failed. Please help! !

Thanks



Data Table
Car Type Colour Spend GreenRedOrange
Car 1Green3 Car 1Spend Spend Spend
Car 2Red4 Car 2Spend Spend Spend
Car 2Red2 Car 3Spend Spend Spend
Car 3Blue 1
Car 1Orange2

<COLGROUP><COL style="WIDTH: 116pt; mso-width-source: userset; mso-width-alt: 5668" width=155><COL style="WIDTH: 48pt" span=7 width=64><TBODY>
</TBODY>
 
Upvote 0
Re: SumIf - multi variables

Hi,

With Data in A16:C21 and Table from E16:H19,

Try in F17,

=SUMPRODUCT(($A$17:$A$21=E17)*($B$17:$B$21=$F$16)*($C$17:$C$21))

and copy down.

Jai
 
Upvote 0
Re: SumIf - multi variables

you could try...assuming your data starts in A1....in F3 under 'GREEN'

Code:
=SUMPRODUCT(($A$2:$A$6=$E2)*($B$2:$B$6=F$1)*$C$2:$C$6)

then drag it right and down.
 
Upvote 0
Re: SumIf - multi variables

I merged your two threads together.

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread. Per forum rules, posts of a duplicate nature will be locked or deleted (rule #9 here: </SPAN>Forum Rules).


Thanks</SPAN>
 
Upvote 0

Forum statistics

Threads
1,215,764
Messages
6,126,750
Members
449,335
Latest member
Tanne

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top