What Formula To Use

singingsister

Board Regular
Joined
Jun 13, 2006
Messages
145
I have a long sheet which monitors when certain documents are sent, returned etc which is listed by company. I have a stats sheet at the front and I want to find a formula that will look for a certain company together with a certain word (i.e sent/returned) to give me a total (ie MacDonalds 12 sent, 4 returned).

How do I do this?
 
um call me thick but:-
=SUMPRODUCT(--(SupplierRange="Macdonalds"),--StatusRange="Open"))
doesn't work?!

can someone explain it better. I think its:-
=sumproduct(log!b3:b300,"macdonalds"),(log!h3:h300,"open)

is that right?
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Brian was just using an example. The formula you want sounds as if it will be:

Code:
=sumproduct((log!b3:b300="macdonalds")+0,(log!h3:h300="open")+0)

Give it a try and post back if you hit difficulties :)
 
Upvote 0
The arguments (such as Log!B3:B300="MacDonalds") within the Sumproduct return arrays (lists) of True and False, depending on whether each cell in the range matches the criteria. Unfortunately, Sumproduct doesn't handle these True/False lists properly and therefore needs help to turn them into numeric values (in this case 1 for True, 0 for False). One way of achieving this is by adding 0:

True+0 = 1
False+0 = 0

Other ways (which are equally valied) would be to multiply by 1 or to use a double minus. So the following are exactly the same:

Code:
=sumproduct((log!b3:b300="macdonalds")+0,(log!h3:h300="open")+0) 
=sumproduct((log!b3:b300="macdonalds")*1,(log!h3:h300="open")*1) 
=sumproduct(--(log!b3:b300="macdonalds"),--(log!h3:h300="open"))

I hope this helps to explain it!
 
Upvote 0

Forum statistics

Threads
1,216,005
Messages
6,128,231
Members
449,435
Latest member
Jahmia0616

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