LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Is the cell really blank?

Dave & Dick
I've resolved to always state the .Value also. Thanks for your help.
Otto
"Dick Kusleika" wrote in message
...
Otto: I agree with everything Dave said. When you leave off the .Value
property, you are still testing the .Value property because it's the
default of the Range object. There are two potential pitfalls to omitting
Value: MS could change the default property or Range; You force the
compiler to look up the default property which is a performance hit.

The performance hit, I'll bet, is so small that you couldn't measure it in
a 10,000 line program and the chance that MS will change the default
property is even less. So I think you're safe leaving it off. I tried to
get into the habit of always specifiying the default property a couple of
years ago, which is why I use it.


--
Dick Kusleika
MVP-Excel
www.dailydoseofexcel.com

Otto Moehrbach wrote:
Dick
That's a good write-up. Thanks for that.
I have one question I want to ask to keep me out of trouble with
this in the future. You say, as have others, that IsEmpty, for the
purposes discussed in this thread, should act on the Value property
of the range object. And that works. But I have always used it (in
ignorance???) on the range object itself, and not on the Value
property of the range object. Am I liable to step in something by
doing this? Thanks again. Otto "Dick Kusleika"
wrote in message
...
Hey Otto:

I didn't a little analysis of IsEmpty that you can see here

http://www.dailydoseofexcel.com/arch...r-empty-cells/

I don't think it necessarily adds anything to what was said here,
but it may.

--
Dick Kusleika
MVP-Excel
www.dailydoseofexcel.com

Otto Moehrbach wrote:
Thanks Dave, Jim, and the Student. That clears it up for me. Otto
"Otto Moehrbach" wrote in message
...
Excel 2002, WinXP
I've been using
If Range(....)="" Then
to check if a cell is blank. I realize that this check is good
only for a blank cell, not for a cell that contains a formula that
returns a blank cell (True in both cases).
I've also used:
If IsEmpty(Range(....)) Then
and this has been working well including the formula case above
(returns False if it contains the formula). However, I've seen on
this newsgroup that "IsEmpty" should only be used to determine if a
variable has been initialized.
Can anyone clarify the use of IsEmpty to determine if a cell is
truly blank? Thanks for your help. Otto





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to return a blank formula cell if the reference is blank? waybomb Excel Worksheet Functions 2 January 22nd 09 05:53 PM
Average Formula to display blank cell if named range is blank Rachael F Excel Worksheet Functions 3 February 22nd 08 05:05 PM
how to get excel to display blank if reference cell blank silent1(not) Excel Worksheet Functions 1 December 2nd 05 02:49 PM
How do I make a blank cell with a date format blank? Pivot Table/Query Excel Worksheet Functions 6 June 14th 05 11:19 PM
COPY A CONCATENATE CELL TO BLANK CELL PUTTING IN THE NEXT BLANK C. QUEST41067 Excel Discussion (Misc queries) 1 January 15th 05 09:29 PM


All times are GMT +1. The time now is 03:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"