MULTIPLE IF STATEMENTS

wilcor

New Member
Joined
Mar 7, 2002
Messages
6
HAVING A LITTLE TROUBLE. I need help on if statements.

EXAMPLE:

IF B2:1000=20 AND C2:10000=AL, SUM D2:1000

Any help will be appreciated.

Bill
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,458
Bill,

Use SUMPRODUCT

=SUMPRODUCT((B2:B1000="20")*(C2:C1000="AL"),D2:D1000)

Although now I see your ranges are not the same size. To use SUMPRODUCT all ranges must be the same size
This message was edited by Brian from Maui on 2002-10-01 12:56
 

wilcor

New Member
Joined
Mar 7, 2002
Messages
6
I used the formula
=SUMPRODUCT((B2:B1000="20")*(C2:C1000="AL"),D2:D1000)

It gave me a total of 0 when the total of D2;D1000 was actually 4222. Col D represents miles driven by a truck.

I must be doing something wrong.

Any more suggestions.

Bill
 

wilcor

New Member
Joined
Mar 7, 2002
Messages
6
Thanks Tom

That worked nicely. Wish I was there. Gotta go now and play 18 holes.

Thanks for your help.

Bill Cortner
 

Forum statistics

Threads
1,144,122
Messages
5,722,613
Members
422,447
Latest member
knopp

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