Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Recognising cell values

I am using the following the line of code in a macro

Do Until Activecell = ""

I then use the Offset command to move down cells in the
spreadsheet. Some of these cells have data hard coded
into them and others have a link to another worksheet
within the spreadsheet. If the linked cell has no value,
ie completely blank, then the cells I am checking have
a 'blank' value. when the above code gets the the linked
cell it assigns a value of '0' (zero) and doesn't
recognise is as "". I can't use

Do Until Activecell = 0

as some of the hard coded cell have a value of '00000'
which again is recognised as '0' (zero).

I have tried various combinations to try and resolve but
am not having any joy, can anyone help with what should be
a very simple problem.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Recognising cell values

Would it work if you used :-

Do Until (Activecell = "") OR (Activecell.Value = 0)


Sean
"Just press the off switch, and go to sleep!"

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Recognising cell values

No, as some of the cell have '00000' hard coded into them
which is recognised as '0'


-----Original Message-----
Would it work if you used :-

Do Until (Activecell = "") OR (Activecell.Value = 0)


Sean
"Just press the off switch, and go to sleep!"

*** Sent via Developersdex http://www.developersdex.com

***
Don't just participate in USENET...get rewarded for it!
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Recognising cell values

Use something like this choosing a suitable column :-


Code
-------------------

lastrow = ActiveSheet.Range("A65536").End(xlUp).Row
For rw = 1 To lastrow
'-etc
Next

-------------------


--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Recognising cell values

If the cells actually appear blank then you can do

do Until ActiveCell.Text = ""

However, a cell linked to a blank cell usually displays zero.

you might use

do until ActiveCell.Hasformula and ActiveCell.Value = 0

If you have zero values suppressed with Tools=Options=View tab, then the
first method will work with linked cells (even though they have a value of
zero).



--
Regards,
Tom Ogilvy

"MIKEYMAY" wrote in message
...
No, as some of the cell have '00000' hard coded into them
which is recognised as '0'


-----Original Message-----
Would it work if you used :-

Do Until (Activecell = "") OR (Activecell.Value = 0)


Sean
"Just press the off switch, and go to sleep!"

*** Sent via Developersdex http://www.developersdex.com

***
Don't just participate in USENET...get rewarded for it!
.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Recognising cell values

See one more suggestion at your other thread.

Mikeymay wrote:

I am using the following the line of code in a macro

Do Until Activecell = ""

I then use the Offset command to move down cells in the
spreadsheet. Some of these cells have data hard coded
into them and others have a link to another worksheet
within the spreadsheet. If the linked cell has no value,
ie completely blank, then the cells I am checking have
a 'blank' value. when the above code gets the the linked
cell it assigns a value of '0' (zero) and doesn't
recognise is as "". I can't use

Do Until Activecell = 0

as some of the hard coded cell have a value of '00000'
which again is recognised as '0' (zero).

I have tried various combinations to try and resolve but
am not having any joy, can anyone help with what should be
a very simple problem.


--

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
Recognising dates pre-1900 Karen H Excel Discussion (Misc queries) 14 May 4th 09 11:37 AM
Excel still not recognising equal values pecan Excel Worksheet Functions 1 July 16th 08 10:40 AM
SUMPRODUCT not recognising dates Del[_2_] Excel Worksheet Functions 6 March 21st 07 07:30 PM
VLookup not recognising numbers Doug Excel Worksheet Functions 7 May 16th 05 04:05 PM
Recognising '0.00' Stuart[_5_] Excel Programming 2 August 19th 03 03:56 PM


All times are GMT +1. The time now is 11:50 PM.

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

About Us

"It's about Microsoft Excel"