How to COUNTIF with duration (h:mm:mm) where cell with value = 1

Ebbie

New Member
Joined
Mar 15, 2022
Messages
2
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
Hello,

I have a sheet with duration values. I already can count the total amount of a specific area (ex : B2:G2) to get the total of time, that's easy and not an issue.
However, I would want to get à value = 1 for each cell in the area where there's a duration. So if I have :

1:00:00
[blank cell]
0:30:00
0:10:30
[blank cell]
2:30:00
[blank cell]
[blank cell]
0:27:34

I would get the result 5 for each time there isn't a blank cell.

The issue I face is that when I use COUNTIF (value1:value2;"*") or COUNTIF (value1:value2;"?"), it doesn't count anything at all. I'm at a lost because it's hard for me to think of another way to do what I want to do AND I don't know how to correctly formulate my question with good keyword for Google to be helpful in that instance.

Please help!

Thank you!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
have you tried counta()
which counts only cells with content and NOT blanks

Book2.xlsx
ABCD
11:00:005
2
30:30:00
40:10:30
5
62:30:00
7
8
90:27:34
10
Sheet3
Cell Formulas
RangeFormula
C1C1=COUNTA(A1:A13)
 
Upvote 0
Solution
have you tried counta()
which counts only cells with content and NOT blanks

Book2.xlsx
ABCD
11:00:005
2
30:30:00
40:10:30
5
62:30:00
7
8
90:27:34
10
Sheet3
Cell Formulas
RangeFormula
C1C1=COUNTA(A1:A13)
I have not. Just did and it worked!!!
Thank you so much for the help, so easy yet couldn't find it ahah
 
Upvote 0

Forum statistics

Threads
1,214,409
Messages
6,119,339
Members
448,888
Latest member
Arle8907

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