Count blank cells that aren't in a range?

LJR69

New Member
Joined
Dec 30, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi, I want to use COUNTIF, or something like it, to count non-blank cells. However those cells are not in a contiguous range. I attach a screenshot below. The cells I've highlight in bright yellow are the ones that I want to check for, but none of the others.

Is there an easy way of doing this?

Thanks!
 

Attachments

  • excelhelp.png
    excelhelp.png
    28.9 KB · Views: 11

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Some clarification:-
- Are you wanting to count the number of cells that contain non-blanks - there is only blank cell in your screenshot
- Are you wanting totals for each of the Bamboo, Circles and Characters
- Are you also wanting totals for each of the Chows and Pungs?
- Are you just wanting one cell that gives a total of the non-blank cells in the No. columns
- Where do you want to display them in relation to your table?
- Is your table going to have more categories below the Pungs?
 
Upvote 0
Some clarification:-
- Are you wanting to count the number of cells that contain non-blanks - there is only blank cell in your screenshot
- Are you wanting totals for each of the Bamboo, Circles and Characters
- Are you also wanting totals for each of the Chows and Pungs?
- Are you just wanting one cell that gives a total of the non-blank cells in the No. columns
- Where do you want to display them in relation to your table?
- Is your table going to have more categories below the Pungs?
Yeah, it probably wasn't the best explanation. I was trying to simplify my question (not well).
What I want to do is do a test to ensure that all those bright yellow cells do not contain any value (other than 0) in order to perform a test for a specific kind of Yaku in Riichi Mahjong. Since posting I've been messing about using and IF statement with a MAXA() function that ends up looking like this monstrosity
Excel Formula:
=IF(OR(B23=TRUE,MAXA(Riichi_scratch!C5,Riichi_scratch!E5,Riichi_scratch!G5,Riichi_scratch!C11,Riichi_scratch!E11,Riichi_scratch!G11,Riichi_scratch!C12,Riichi_scratch!E12,Riichi_scratch!G12,Riichi_scratch!C20,Riichi_scratch!E20,Riichi_scratch!G20)>0),TRUE,FALSE)
What I'd really like to do is just do a something like a COUNTBLANK for those cells (as 0 in those cells returns False, which is fine)

I have a datasheet in which I have a field defined as 'NoTerminalsChk' - it's that field which this formula will go in. Then whenever I need to check for any terminals (which is what those bright yellow fields are) I have an easy, clean, nice to read IF statement that just checks NoTerminalsChk = TRUE

I hope I've explained it a bit better, but let me know if more details would be useful.
 
Upvote 0
I meant to add a broader image of the spreadsheet
 

Attachments

  • fullRiichiExcel.png
    fullRiichiExcel.png
    141.9 KB · Views: 7
Upvote 0
Can't see the 'NoTerminalsChk' field - but formula - =COUNTA(D5,D10:D11,D19,F5,F10:F11,F19,H5,H10:H11,H19) does the trick for me
The Excel COUNTA function returns the count of cells that contain numbers, text, logical values, error values and empty text (""). COUNTA does not count empty cells (A single space in a cell that looks like a blank)
 
Upvote 0
Solution

Forum statistics

Threads
1,214,952
Messages
6,122,458
Members
449,085
Latest member
ExcelError

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