![]() |
Go to the next blank row in a column (xlDown)
Does anyone know of a way to have excel go to the next blank row in a column?
I currently use XlDown but this only takes me to the last row with values. This causes my macro to overwrite the last row's data and is a significant problem for me. I've used the following suggestions: 1. .End(xlDown).Offset(1,0) Problem: I get a compile error that says "expected = " So then I do, .End(xlDown).Offset = 0 or .End(xlDown).Offset = 1 because this is the only way that does not cause a compile error that I've found. However the problem remains. Excel will go to the last row with values and replace the cell with either (1) or (0). 2. I've also tried: dim rng as range set rng = sheets("Sheet1").Range("A65536").end(xlUp).offset( 1,0) Problem: Same problem as the other. Please tell me what I'm doing wrong or if there is another way. Thank you. |
Go to the next blank row in a column (xlDown)
I don't see anything wrong with:
dim rng as range set rng = sheets("Sheet1").Range("A65536").end(xlUp).offset( 1,0) Posting more of you code will make it easier to determine the problem, for example maybe you need to state: .End(xlDown).Offset(1,0) = MyVariable Regards Rowan "tomwashere2" wrote: Does anyone know of a way to have excel go to the next blank row in a column? I currently use XlDown but this only takes me to the last row with values. This causes my macro to overwrite the last row's data and is a significant problem for me. I've used the following suggestions: 1. .End(xlDown).Offset(1,0) Problem: I get a compile error that says "expected = " So then I do, .End(xlDown).Offset = 0 or .End(xlDown).Offset = 1 because this is the only way that does not cause a compile error that I've found. However the problem remains. Excel will go to the last row with values and replace the cell with either (1) or (0). 2. I've also tried: dim rng as range set rng = sheets("Sheet1").Range("A65536").end(xlUp).offset( 1,0) Problem: Same problem as the other. Please tell me what I'm doing wrong or if there is another way. Thank you. |
All times are GMT +1. The time now is 10:38 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com