Home |
Search |
Today's Posts |
#12
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to return a blank formula cell if the reference is blank? | Excel Worksheet Functions | |||
Average Formula to display blank cell if named range is blank | Excel Worksheet Functions | |||
how to get excel to display blank if reference cell blank | Excel Worksheet Functions | |||
How do I make a blank cell with a date format blank? | Excel Worksheet Functions | |||
COPY A CONCATENATE CELL TO BLANK CELL PUTTING IN THE NEXT BLANK C. | Excel Discussion (Misc queries) |