View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Find end of list - new problem

Maybe col A is blank and you need to change to B or C or ?
What it is doing is going to the bottom of the column and then going up till
something is found.

--
Don Guillett
SalesAid Software

"Maria" wrote in message
...
Hello again!

Recently I had this problem: My macro fills in data
into a column with the length of the range called "vol1"
daily. Sometimes, if no value is found from the data
sources, it leaves cells blank. Now, I'd like to find the
end of the list (last entry) but can't use the specialCells
(xlCellTypeBlanks) command (because an empty cell might
not be the last entry). Is there any other option? I think
the macro needs to check if from one empty cell on all
following cells (until the end of the range) are empty too.

.. and tried the following:
iLastRow = Cells(Rows.Count,"A").End(xlUp).Row

It works in general, but unfortunately not in my document.
I can't find the error. Does anybody know what the problem
might be? iLastRow always turns out as 1 which is
incorrect. Maybe excel cant't find data, but I don't know
why ...

Thanks for helping me,
Maria