If everything works as designed *EXCEPT* the row count, then your problem
must be with how you are telling your code that you have reached the last
row. Your code:
if activecell.value = a then
activecell.offset(1, 0).select
row = row + 1
end if
will increment the variable "row" *ONLY* if value = a. If you want it to
stop after row 90 REGARDLESS of ActiveCell.Value, the you need to change how
it detects the row and decides whether to keep going.
Try this:
delete "row = row+1" from its current place
insert "row = row+1" just before "loop until row90"
This will increment "row" every time your code runs, and stop it after row
90.
The end of your code will then be:
activecell.value = \"absent\"
row = row + 1
loop until row 90
end sub
HTH
Ed
"lykwid " wrote in message
...
Huge thanks for your suggestion, but I don't understand what you mean :(
---
Message posted from http://www.ExcelForum.com/