ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   #REF! in while loop (https://www.excelbanter.com/excel-programming/345621-ref-while-loop.html)

[email protected]

#REF! in while loop
 
dear all

i wrote a macro with a while clause, unfortunately there are also some
rows which have #REF! and I want to delete them as well. How do I do
it?

last= 2011
Do While IsNumeric(ActiveSheet.Cells(i, 1).Value) And
ActiveSheet.Cells(i, 1).Value last


Dirk


Tom Ogilvy

#REF! in while loop
 
if iserror(Activesheet.Cells(i,1).value) then
' cell contains an error value


--
Regards,
Tom Ogilvy


wrote in message
ups.com...
dear all

i wrote a macro with a while clause, unfortunately there are also some
rows which have #REF! and I want to delete them as well. How do I do
it?

last= 2011
Do While IsNumeric(ActiveSheet.Cells(i, 1).Value) And
ActiveSheet.Cells(i, 1).Value last


Dirk





All times are GMT +1. The time now is 05:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com