ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find end of list (https://www.excelbanter.com/excel-programming/326334-find-end-list.html)

Maria[_7_]

Find end of list
 
Hello again!

To explain my problem properly: 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.

I hope someone can help! Thanks again,

Maria

Bob Phillips[_6_]

Find end of list
 

iLastRow = Cells(Rows.Count,"A").End(xlUp).Row

--

HTH

RP
(remove nothere from the email address if mailing direct)


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

To explain my problem properly: 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.

I hope someone can help! Thanks again,

Maria




Maria[_7_]

Find end of list
 
Thank you! It worked!

-----Original Message-----

iLastRow = Cells(Rows.Count,"A").End(xlUp).Row

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Maria" wrote in

message
...
Hello again!

To explain my problem properly: 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.

I hope someone can help! Thanks again,

Maria



.



All times are GMT +1. The time now is 02:23 AM.

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