Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 265
Default 0 considered as empty

Hi, is there somehow tell VB that 0<Empty??????
I have problems with this part of my code

blablabla
If Cells(aa, columna) = c Then
ssss = Cells(aa, columna).Address(False, False)
Set rngEndCell = Range(ssss)
columna = columna + 1
b = b + 1
GoTo siguiente2
End If
blalbalba

when c=0 but cells(aa,columna)=empty the programs goes inside the if structure

So I need to tell VB that 0 is different of Empty
How to accomplish this????
TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default 0 considered as empty

Change the If line to read:

If (Cells(aa, columna) < "") and (Cells(aa, columna) = c) Then

That's all on one line.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 0 considered as empty

if isempty(yourcellhere) then
'do what you want with empty
else
if yourcellhere.value = 0 then
'not empty, but equal to 0.
end if
end if



filo666 wrote:

Hi, is there somehow tell VB that 0<Empty??????
I have problems with this part of my code

blablabla
If Cells(aa, columna) = c Then
ssss = Cells(aa, columna).Address(False, False)
Set rngEndCell = Range(ssss)
columna = columna + 1
b = b + 1
GoTo siguiente2
End If
blalbalba

when c=0 but cells(aa,columna)=empty the programs goes inside the if structure

So I need to tell VB that 0 is different of Empty
How to accomplish this????
TIA


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 265
Default 0 considered as empty

thanks Dave, it works just fine
sorry Mark but it didn't work well

"Dave Peterson" wrote:

if isempty(yourcellhere) then
'do what you want with empty
else
if yourcellhere.value = 0 then
'not empty, but equal to 0.
end if
end if



filo666 wrote:

Hi, is there somehow tell VB that 0<Empty??????
I have problems with this part of my code

blablabla
If Cells(aa, columna) = c Then
ssss = Cells(aa, columna).Address(False, False)
Set rngEndCell = Range(ssss)
columna = columna + 1
b = b + 1
GoTo siguiente2
End If
blalbalba

when c=0 but cells(aa,columna)=empty the programs goes inside the if structure

So I need to tell VB that 0 is different of Empty
How to accomplish this????
TIA


--

Dave Peterson

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
If result of formula is "" (Blank) why is this considered a num. Frank Winston Excel Worksheet Functions 8 January 2nd 07 12:58 AM
why a reference to an empty cell is not considered empty Nicoscot Excel Discussion (Misc queries) 10 March 10th 06 05:36 AM
what is used for cell entries that are considered subsections of . dovie1957 Excel Discussion (Misc queries) 1 March 16th 05 01:39 AM
Using a function from a vba add-in: is that considered an external link Bura Tino Excel Programming 6 May 7th 04 07:59 AM
Can blank cells created using empty Double-Quotes not be empty?? JohnI in Brisbane Excel Programming 6 September 7th 03 11:22 PM


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