Need a formula PLEASE!

tammyz

New Member
Joined
Apr 26, 2011
Messages
9
I need a formula that will count the number of times ie; apples, oranges, are listed in c26:c35 BUT will not count IF a26:a35 is blank.

Seems pretty simple but I just can't come up with it when it is looking for more than one selection in the "c" column. In other words, I used a "sumproduct" formula when just looking for say, "apples" and it seemed to work. But when I add addition criteria it won't work. H E L P !! :confused:
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
WOW! Thank you for the quick response!!!

I tried that formula and it does work as long as I am only looking for "apples". It just doesn't seem to work when I want it to look for multiple criteria like "count every time apples and oranges and bananas appear in this column. Appreciate it!!!
 
Upvote 0
I need a formula that will count the number of times ie; apples, oranges, are listed in c26:c35 BUT will not count IF a26:a35 is blank.

Seems pretty simple but I just can't come up with it when it is looking for more than one selection in the "c" column. In other words, I used a "sumproduct" formula when just looking for say, "apples" and it seemed to work. But when I add addition criteria it won't work. H E L P !! :confused:
Try...

Either:

=SUMPRODUCT(--ISNUMBER(MATCH(C26:C35,{"apples","oranges"},0),--(A26:A35<>""))

Or:

=SUMPRODUCT(--ISNUMBER(MATCH(C26:C35,E2:E3,0),--(A26:A35<>""))

where E3:E3 houses the criteria of interest.
 
Upvote 0
If you want multiple criteria try like this

=SUMPRODUCT(ISNUMBER(MATCH(C26:C35,{"apples","oranges","bananas"},0))*(A26:A35<>""))

or list all the fruit in a range, e.g. Z1:Z3 and use this version

=SUMPRODUCT(ISNUMBER(MATCH(C26:C35,Z1:Z3,0))*(A26:A35<>""))
 
Upvote 0
Thank you VERY MUCH! The first formula appears that it is going to work but the cell is displaying the formula rather than the result.
 
Upvote 0
Thank you VERY MUCH! The first formula appears that it is going to work but the cell is displaying the formula rather than the result.

Activate Edit|Replace or Find & Select|Replace.
Set Find what to: =
Set Replace with to: =
Run Replace All.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,284
Members
452,902
Latest member
Knuddeluff

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