Formula help...

gary555

New Member
Joined
Jul 19, 2006
Messages
11
Hi guys,
Let's get to the point:

ColumnA ColumnB
1.99 5
2.99 5
3.99 5
1.99
2.99 5
3.99 5
1.99 5
2.99 5
3.99 5

O.K. simple question: I have the price of 1.99 listed three times, but the quantity is only there two times. How can I write a formula to COUNT the number of instances where Column A is 1.99 AND where column B is greater than 0?

In this case the formula should return 2, since only two "records" have 1.99 AND a quantity greater than 0.

I tried using AND and countif, but can't get it to work...

Any help is appreciated!!

Thanks! :biggrin:
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

jimrward

Well-known Member
Joined
Feb 24, 2003
Messages
1,792
Office Version
  1. 2016
  2. 2013
  3. 2011
  4. 2010
  5. 2007
Platform
  1. Windows
you can use the SUMPRODUCT function as follows

=SUMPRODUCT((A2:A10=1.99)*(B2:B10>0))

remember to keep the ranges the same size
 

Forum statistics

Threads
1,141,740
Messages
5,708,235
Members
421,553
Latest member
Geeyj

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