help!

Autumn

New Member
Joined
Apr 24, 2002
Messages
8
I need to count how many times 2 particular requirements were met on a spreadsheet. For example: I have a spreadsheet of cars listed by color and price. I want to know how many red cars listed (column A) are under $5000.00 (column B). I've tried countif + countif and it just adds the totals instead of distinguishing those that meet both requirements. Any ideas? Thanks.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Hiya, say your talking about through row 100:

=SUMPRODUCT((A1:A100="red")+0,(B1:B100<50000)+0)

Hope this helps,
Adam
 
Upvote 0
On 2002-04-25 09:59, Autumn wrote:
I need to count how many times 2 particular requirements were met on a spreadsheet. For example: I have a spreadsheet of cars listed by color and price. I want to know how many red cars listed (column A) are under $5000.00 (column B). I've tried countif + countif and it just adds the totals instead of distinguishing those that meet both requirements. Any ideas? Thanks.

Lets say that you have the color condition in D2 and the price condition in E2. What follows would give you the desired count:

=SUMPRODUCT((A2:A400=D2)*(B2:B400=E2))

where A2:A400 houses the color values and B2:B400 the prices.

Aladin
 
Upvote 0
Thanks for the suggestions. The sumproduct formula worked, my follow up question: is there a way to alter the formula so I can search all of the columns? I mean, say I have 10 columns total, 5 are color and 5 are price, can I "search" all of the columns for my 2 criteria with one formula? By chance?
Thanks again.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,428
Members
448,961
Latest member
nzskater

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