COUNTA formula question

Mel Smith

Well-known Member
Joined
Dec 13, 2005
Messages
1,023
Office Version
  1. 365
Platform
  1. Windows
I'm trying to write a formula that uses the COUNTA formula (I think). I want to count if cell c2 or c3 is not blank. If they are both empty I would expect the result to be 0. If either one contains text then I would expect the result to be 1.

Any thoughts, please?

Mel
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Try

Excel Formula:
=COUNTA(C2:C3)
Except that will return "2" if there is something in both cells, and they only want "1" in that case.

Try:
Excel Formula:
=MIN(COUNTA(C2:C3),1)
 
Upvote 0
Solution
Hello Sufiyan,

Your formula is fine if both cells are empty - it gives me the correct answer. What I'm trying to achieve, though is if C2 OR C3 contain text I expect the result to be 1. If BOTH cells contain text I'm still looking for the answer to be one.

Mel
 
Upvote 0
You are welcome.
Glad we were able to help!
 
Upvote 0

Forum statistics

Threads
1,215,393
Messages
6,124,680
Members
449,180
Latest member
kfhw720

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