Counting Blanks as Zeroes

USAFMichael

New Member
Joined
Jan 11, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hello All,

I have a workbook that non-Excel people use. It records the progress of the elevator car we're installing. It's a free-form table where users can enter their car IDs anywhere in the "Car" column (see the example). I want to count cars "not started" as a data point. Unfortunately users, aren't always putting a "zero" and are leaving the "progress" column blank to represent "zero progress". I want to be able to work around this, since the countif function ignores blanks.

I think there has to be a way to use the "car" column to determine if the "progress" column should be counted. Essentially, if there's data in the "car" column and a blank in the associated "progress" column, count that as a zero (and obviously also count the actual zeroes).

In both examples, "Cars not started" should equal "3".


Sorry if I omitted any required info.


Thanks in advance!


Michael
 

Attachments

  • Screenshot_20230111_024125.png
    Screenshot_20230111_024125.png
    45.9 KB · Views: 10

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Why don't you put in a formula like this in cell E5 and fill down

Excel Formula:
=if(D5<>"",0,"")
 
Upvote 0
Hi & welcome to MrExcel.
How about
Fluff.xlsm
ABCDEFG
1
2
3
4
53A0%E100%
6B
7C25%F100%
8D80%G
Lists
Cell Formulas
RangeFormula
B5B5=SUM(COUNTIFS(D5:F8,"?*",E5:G8,{0,""}))
 
Upvote 0
Solution
Hi & welcome to MrExcel.
How about
Fluff.xlsm
ABCDEFG
1
2
3
4
53A0%E100%
6B
7C25%F100%
8D80%G
Lists
Cell Formulas
RangeFormula
B5B5=SUM(COUNTIFS(D5:F8,"?*",E5:G8,{0,""}))

Thanks for both the warm-welcome and the solution Fluff! I can barely understand your voodoo magic, but it works!!!

If you have a moment, would you mind walking me through the formula? I can see that you're using wildcards and array brackets, but don't quite get how it all works together.

Cheers!

Michael
 
Upvote 0
Or we could create a macro to do it also
I appreciate the assist! I wasn't clear in my description, but users have to enter data in the E column and I'm avoiding macros in this workbook. Decided to go with Fluffs idea.
 
Upvote 0
Glad we could help & thanks for the feedback.
The "?*" will count any cell with text & the {0,""} will count cells that are either 0 or blank
 
Upvote 0
I appreciate the assist! I wasn't clear in my description, but users have to enter data in the E column and I'm avoiding macros in this workbook. Decided to go with Fluffs idea.
No problem at all, glad you got it sorted
 
Upvote 0

Forum statistics

Threads
1,214,885
Messages
6,122,085
Members
449,064
Latest member
MattDRT

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