View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Blank cells corrupt?

Your problem is the "blank" cells are not genuine empties. These cells are
easy to create for demonstration purposes:

1. pick a cell, say A1 and clrear it with Edit Clear all
2. then enter a null with =""
3. then copy A1 and paste/special/values back onto A1

At this point, A1 APPEARS to be empty, both in the cell and in the formula
bar.
However, =ISBLANK(A1) returns FALSE!!

This type of "pseudo-blank" cell will not be found by goto special blanks.

You can also create "pseudo-blanks" with VBA:

Sub demo()
Set a1 = Range("A1")
a1.NumberFormat = "@"
a1.Value = ""
End Sub

--
Gary''s Student - gsnu200909


"Dave Unger" wrote:

Hello,

I received a simple spreadsheet from a client, mainly consisting of a
column of numbers. The numbers are arranged in groups of 10, each
group is separated by a blank cell.

Heres the problem €“ if I try to select those blank cells, either by
GotoSpecialBlanks from the menu, or r.SpecialCells
(xlCellTypeBlanks).Select via VBA, I get a €śNo cells were found€ť error
message. And yet r.Find("").Select works just fine.

There are no formulas in these cells, or anything else out of the
ordinary that I can see. If I click in the formula bar & hit Enter,
everything works as expected. Also, stepping thru the blank cells via
VBA and making a change also fixes it.

Can someone suggest to me what may be the problem, and how those cells
could have got into that state in the first place? Thank you.

Regards,

DaveU
.