#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default empty cell?

how come blank cells have a value of greater than 0???

i have a simple formula:

If Range("b10") 0 Then Range("h31") = 1

b10 is blank, yet is still sets h31 = 1

how do i get around this???
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default empty cell?

B10 may contain a space character, so it looks empty, but isn't.
Select cell B10, and press the Delete key, and that may fix the problem.

Lawson wrote:
how come blank cells have a value of greater than 0???

i have a simple formula:

If Range("b10") 0 Then Range("h31") = 1

b10 is blank, yet is still sets h31 = 1

how do i get around this???



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default empty cell?

Hi Lawson,

Your observed result is consistent with B10 containing a formula which
returns "". It is not consistent with B10 being empty.

To deal with the first scenario, try:

If IsNumeric(Range("B10").Value) And Range("B10") 0 _
Then Range("H31") = 1

---
Regards,
Norman



"Lawson" wrote in message
...
how come blank cells have a value of greater than 0???

i have a simple formula:

If Range("b10") 0 Then Range("h31") = 1

b10 is blank, yet is still sets h31 = 1

how do i get around this???



Reply
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
When is a cell empty and how do I empty it. C Brandt Excel Discussion (Misc queries) 5 August 13th 07 05:37 PM
Leaving an empty cell empty GRL Excel Discussion (Misc queries) 4 April 22nd 06 05:47 PM
why a reference to an empty cell is not considered empty Nicoscot Excel Discussion (Misc queries) 10 March 10th 06 05:36 AM
Empty cell and a the empty String JE McGimpsey Excel Programming 0 September 13th 04 04:12 PM
VBA to copy to empty cell directly below a cell when analogous cells in different column have same value as each other? SROSENYC Excel Programming 1 August 5th 03 04:34 AM


All times are GMT +1. The time now is 02:31 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"