How to Reference "" (Blank) in an IF formula

apmale

New Member
Joined
Jul 21, 2009
Messages
18
I can't seem to figure out to cause an IF formula to utilize 'blank' as a referenced criteria. Here is a simplified version of the problem:

Column A
Criterion = 1
Criterion = 2
Criterion = 3
Criterion = Blank

=countif(Range,[criterion]) - this works for rows 1 - 3
=countif(Range, "") - this works for row 4

I want to be able to use the first formula with row 4, too, but it doesn't work with any of the syntaxes I've been trying (e.g., """", isblank).

I'd appreciate any thoughts on how or if this can be done. Thanks!
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Try entering this as the criterion; ie in cell A4 enter:
=""
 
Upvote 0
If the range is B1:B10, and the criterion cell E1 then try:
=COUNTIF(B1:B10,IF(E1="","",E1))
 
Upvote 0
Thanks, guys. Let me restate as my original example wasn't clear:

- I have an array called 'loandata', which has 500 rows. 300 are 'loan a', 100 are 'loan b', 75 are 'loan c' and 25 are blank. The formulas i'm using now are:

Column A
Loan A =countif(loandata,a1) = 300
Loan B =countif(loandata,a2) = 100
Loan C =countif(loandata,a3) = 75
"" = countif(loandata,"") = 25
= countif(loandata,a4) = 0

So, the formula with the "" included works, but the reference to "" does not work. I tried Andrew's suggestion of "="&A4, but that didn't seem to work. thanks again for your insights.
 
Upvote 0
It appears to work for me (as does my suggestion)
Excel Workbook
ABCD
1A4A
2B5A
3C6A
47A
5B
6B
7
8
9
10
11B
12B
13B
14
15
16C
17C
18C
19C
20C
21
22C
Sheet1
#VALUE!
</td></tr></table></td></tr></table>
 
Upvote 0
Hi

Try:

=COUNTBLANK(loandata)

This will count all the empty cells and those with empty strings in the range loandata.
 
Upvote 0

Forum statistics

Threads
1,223,262
Messages
6,171,080
Members
452,377
Latest member
bradfordsam

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