default_name
Board Regular
- Joined
- May 16, 2018
- Messages
- 180
- Office Version
- 365
- 2016
- Platform
- Windows
- MacOS
Hello,
I have a large batch of data that, once generated has some blank cells in it.
I am attempting to count a column of the data, using the COUNTA function, to count the number of cells that have content in them.
Upon doing this, however, I realized that the COUNTA function was counting every cell in the range, regardless of whether or not it appeared to be blank.
I tested out a few of the "supposedly blank cells" with an ISBLANK function and discovered that although they appear blank, they are not being recognized as such by other formulas (they appear as FALSE with the ISBLANK function). It's as if they are ghosts.
I noticed that if I click in the "blank" cell, and hit enter (or F2+Enter) that the cell finally appears as a blank (as TRUE using the ISBLANK function).
I am currently using the following VBA code to try and run through this column and correct these ghost cells:
Not only does this code not work, but it takes forever to execute.
Is there a more simple way to solve this issue with this cell range?
Thanks in advance
I have a large batch of data that, once generated has some blank cells in it.
I am attempting to count a column of the data, using the COUNTA function, to count the number of cells that have content in them.
Upon doing this, however, I realized that the COUNTA function was counting every cell in the range, regardless of whether or not it appeared to be blank.
I tested out a few of the "supposedly blank cells" with an ISBLANK function and discovered that although they appear blank, they are not being recognized as such by other formulas (they appear as FALSE with the ISBLANK function). It's as if they are ghosts.
I noticed that if I click in the "blank" cell, and hit enter (or F2+Enter) that the cell finally appears as a blank (as TRUE using the ISBLANK function).
I am currently using the following VBA code to try and run through this column and correct these ghost cells:
Code:
Sub mod1()
Range("K43:K20000").Select
Dim r1 As Range, r2 As Range
Set r2 = Selection
For Each r1 In r2
r1.Select
Application.SendKeys "{f2}{enter}"
DoEvents
Next
End Sub
Not only does this code not work, but it takes forever to execute.
Is there a more simple way to solve this issue with this cell range?
Thanks in advance
Last edited: