![]() |
How can I select the first blank cell
Hi all,
please help. I have to add every day new data (number of rows is various) to existing data sheet. I suppose to use macro and run that automatically at night. As I have to add it to table where number of rows will groe up, I need to start copying new data to the first blank cell in the first column. How can I force macro to find this blank cell when the position will shift? Many thanks, Valdemar |
How can I select the first blank cell
Find the end of a list:
here are a couple different ways: this will select the cell. it's not a good practice to select, but just used as an illustration here. range(worksheets("Sheet1").cells(rows.Count,"A").e nd(xlup).address).Select or if you just want A5 returned: lastcell = worksheets("Sheet1").cells(rows.Count,"A").end(xlu p).address(0,0) Find Last Used Cell: Sub FindLastCell1() Cells(Rows.Count, "A").End(xlUp).Select End Sub Sub FindLastCell2() Range("A:A").Find("*", Cells(1), _ xlValues, xlWhole, xlByRows, xlPrevious).Select End Sub -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. "Valdemar" wrote: Hi all, please help. I have to add every day new data (number of rows is various) to existing data sheet. I suppose to use macro and run that automatically at night. As I have to add it to table where number of rows will groe up, I need to start copying new data to the first blank cell in the first column. How can I force macro to find this blank cell when the position will shift? Many thanks, Valdemar |
How can I select the first blank cell
Valdemar,
ActiveSheet.Cells(Rows.Count,1).End(xlUp)(2).Selec t will select the first empty cell at the bottom of column A. HTH, Bernie MS Excel MVP "Valdemar" wrote in message ... Hi all, please help. I have to add every day new data (number of rows is various) to existing data sheet. I suppose to use macro and run that automatically at night. As I have to add it to table where number of rows will groe up, I need to start copying new data to the first blank cell in the first column. How can I force macro to find this blank cell when the position will shift? Many thanks, Valdemar |
How can I select the first blank cell
Hi ryguy7272, many thanks for you help and have a nice day
Valdemar ryguy7272 pÃ*Å¡e: Find the end of a list: here are a couple different ways: this will select the cell. it's not a good practice to select, but just used as an illustration here. range(worksheets("Sheet1").cells(rows.Count,"A").e nd(xlup).address).Select or if you just want A5 returned: lastcell = worksheets("Sheet1").cells(rows.Count,"A").end(xlu p).address(0,0) Find Last Used Cell: Sub FindLastCell1() Cells(Rows.Count, "A").End(xlUp).Select End Sub Sub FindLastCell2() Range("A:A").Find("*", Cells(1), _ xlValues, xlWhole, xlByRows, xlPrevious).Select End Sub -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. "Valdemar" wrote: Hi all, please help. I have to add every day new data (number of rows is various) to existing data sheet. I suppose to use macro and run that automatically at night. As I have to add it to table where number of rows will groe up, I need to start copying new data to the first blank cell in the first column. How can I force macro to find this blank cell when the position will shift? Many thanks, Valdemar |
How can I select the first blank cell
Hi Bernie, many thanks for your very usefull help
Valdemar Bernie Deitrick pÃ*Å¡e: Valdemar, ActiveSheet.Cells(Rows.Count,1).End(xlUp)(2).Selec t will select the first empty cell at the bottom of column A. HTH, Bernie MS Excel MVP "Valdemar" wrote in message ... Hi all, please help. I have to add every day new data (number of rows is various) to existing data sheet. I suppose to use macro and run that automatically at night. As I have to add it to table where number of rows will groe up, I need to start copying new data to the first blank cell in the first column. How can I force macro to find this blank cell when the position will shift? Many thanks, Valdemar . |
All times are GMT +1. The time now is 11:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com