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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
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,181,106
Messages
5,928,101
Members
436,588
Latest member
mummabare

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