View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_3_] Alan Beban[_3_] is offline
external usenet poster
 
Posts: 130
Default Can blank cells created using empty Double-Quotes not be empty??

Perhaps this is seen more clearly in the VBA analog. Again with A1:A7
filled with 3 empty strings and 4 blanks, execute

Set rng = Range("A1:A7")
For i = 1 To 7
If rng(i).Value = "" Then k = k + 1
Next
MsgBox k '<------Displays 7
For i = 1 To 7
If IsEmpty(rng(i)) Then k = k + 1
Next
MsgBox k '<------Displays 4

Alan Beban

Alan Beban wrote:
For a general response, cells that contain the empty string (i.e., cells
into which has been entered ="") are certainly distinguishable from
cells with nothing in them i.e., blanks. One way to observe this is to
enter the empty string into 3 of the cells in A1:A7, leaving the other 4
cells blank. Then =COUNTIF(A1:A7,"=") will return 4, the number of
blanks, and =COUNTIF(A1:A7,"") will return 7, the combined count. So,
obviously,
=COUNTIF(A1:A7,"")-COUNTIF(A1:A7,"=") will return 3, the number of empty
strings.

Alan Beban

JohnI in Brisbane wrote:

Hello there,

I have a spreadsheet into which I load daily data using a macro. There is
data for about 50% of the codes each day.
First, I test whether there are any new codes, and add those to the
bottom
of my list.
Then I load the data using the VLOOKUP simplified as follows-

= if(ISERROR(<VLOOKUP formula),"",(<VLOOKUP formula)
NOTE:- There is no space between the two double-quotes.

Then - "Copy" - "Paste Special-Values" - to remove the formulas.

Then I was playing around and noticed that-

-"Edit" -"Go To..." -"Special" -"Blanks"

only selected the earlier empty cells for new codes added, but not for
old
codes with empty cells.

I changed the macro to ".ClearContents" for all empty cells created by
the
VLOOKUP formula above.

The result was that I was able to select all blanks using the "Go
To..."-etc- "Blanks" command shown above.
More astonishingly my file size reduced from 8 megabytes to 4 megabytes.

This is the reason for my question - "Can blank cells created using empty
Double-Quotes not be empty?"

regards,

JohnI