COUNTIFS IN EXCEL 2007: Text & Numeric Values

jimmy2times

Board Regular
Joined
Aug 8, 2014
Messages
69
in cell O45 I have a countif formula


The formula is looking at the cell range O7:O11 and counting yes,no, n/a appear.


I then want to conver the result of the countif from a number to a text value using this logic:


If the "no" count is zero, return "yes"


If the "no" count is 1-5, return "no"


So I think it will be something like an if statement combined with a countif & then converting number to text.


If there is a way of achieving this by formula or by VBA please let me know
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Another approach:
=LOOKUP(COUNTIF($O$7:$O$11,"no"),{0,5},{"yes","no"})

Hi Neil,

Thanks for this. It is a step in the right direction. When I test the formula, it is still not quite right. If some of the cells in O7:O11 are NO and some are Yes, the formula should return NO but it is still showing Yes.

Can you tweak this formula to rectify?
 
Upvote 0
Hi Neil,

Thanks for this. It is a step in the right direction. When I test the formula, it is still not quite right. If some of the cells in O7:O11 are NO and some are Yes, the formula should return NO but it is still showing Yes.

Can you tweak this formula to rectify?

My bad - change the 5 to a 1 and you should be good to go.
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

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