View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
tomwashere2 tomwashere2 is offline
external usenet poster
 
Posts: 13
Default 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.