Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-29-2025, 04:43 AM
MartinGM MartinGM is offline Can a cell be both blank and not blank ? Windows 11 Can a cell be both blank and not blank ? Office 2021
Competent Performer
Can a cell be both blank and not blank ?
 
Join Date: May 2023
Location: England
Posts: 101
MartinGM is on a distinguished road
Default Can a cell be both blank and not blank ?

I have been having problems with a large workbook which I have tracked down to an odd behaviour where a cell seems to be both blank and not blank !



There is a named range, let's call it GreenBox, and to illustrate the issue I have used two ways of calculating how many cells it contains:

The first method multiplies the number of rows by the number of columns - and gives the correct result:
=ROWS(GreenBox)*COLUMNS(GreenBox)

The second method sums the number of filled cells and the number of blank cells and gives a number of cells that is 1 greater then the first method:
=COUNTA(GreenBox)+COUNTBLANK(GreenBox)

I finally pinpointed the issue when I found one cell which returns a value of 1 from COUNTA and a value of 1 from COUNTBLANK.

I can't see how this is possible ?

If I copy the offending cell into another part of the GreenBox range, the discrepancy rises to 2 - as I would expect. No contents are visible in the offending cell and deleting its contents makes no difference. But erasing the cell completely with Clear All sorts out the discrepancy.

The discrepancy arises from time to time - I have no idea how - and I would like to undertand what is going on so that I can stop it from happening.

I have a small workbook which illustrates the issue but I can't attach it here because it has a lot of personal customisation in the ribbon which gives away personal information. I would post it if I could find a way of making this one workbook have no customisation.

Appreciate any help / ideas.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
IF cell in Col A is populated BUT cell in Col C is blank DELETE ROW ChrisOK Excel Programming 7 05-05-2019 09:00 PM
Can a cell be both blank and not blank ? Fill blank cell with value from adjacent cell kevinbradley57 Excel Programming 2 04-17-2018 08:40 AM
Can a cell be both blank and not blank ? Formulato say if cell is blank do this, if not blank do this. mbesspiata Excel 1 01-17-2015 05:02 AM
Can a cell be both blank and not blank ? not showing blank cell alw Excel 4 03-13-2014 01:08 PM
Can a cell be both blank and not blank ? How to turn all blank lines into non-blank for legal forms sieler Word 3 04-12-2009 01:38 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft