Sumproduct

texasalynn

Well-known Member
Joined
May 19, 2002
Messages
8,458
Ok what is wrong with this?

=+SUMPRODUCT(((BASE!$M$3:$M$47<12)*(BASE!$M$3:$M$47>50)*(BASE!$M$3:$M$47<>0.1))*(BASE!$X$3:$X$47))

I have in column various sizes and I need to add all sizes that are
NOT .1
> 50
< 12
add what's in column X

We don't always have all those sizes but still need to get a total. Right now there is no size > 50, so I get 0. But why can't I get a total of the others?
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
Hi texasalynn

You are trying to select values that are <12 and >50. Both conditions cannot be true at the same time.

HTH
PGC
 

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
Unless you mean OR instead of AND. In that case

EDIT: Bad formula

HTH
PGC
 

fairwinds

MrExcel MVP
Joined
May 15, 2003
Messages
8,638

ADVERTISEMENT

=SUMPRODUCT(--ISNUMBER(BASE!$M$3:$M$47),(BASE!$M$3:$M$47<12)+(BASE!$M$3:$M$47>50),--(BASE!$M$3:$M$47<>0.1),BASE!$X$3:$X$47)
 

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
Hi again

In case you saw the formula in my post, looking at fairwinds' formula I realized see that my interpretation

(NOT .1 ) OR (<12) OR (>50) makes no sense

Fairwinds interpretation makes sense

((<12)) OR (>50)) AND (NOT .1 )

Sorry
PGC
 

texasalynn

Well-known Member
Joined
May 19, 2002
Messages
8,458
whew! Thanks Fairwinds! I don't think I've ever had the , and + together in the same formula like that.

Edit:
why did you have the isnumber bit on column M without a condition?? I took it out so my results.
 

fairwinds

MrExcel MVP
Joined
May 15, 2003
Messages
8,638
why did you have the isnumber bit on column M without a condition?

Just to be on the safe side. Else a blank cell in column M would qualify to be included in the sum.
 

Forum statistics

Threads
1,141,718
Messages
5,708,072
Members
421,543
Latest member
SGM

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
Top