![]() |
Last cell (not blank)
Hello,
How do you translate in VBA the selection from the current cell down to the last one (not blank). If I had to do the operation manually in a workbook, I would select the first cell, then hold SHIFT, press END then ARROW DOWN. Thank you. Eric |
Last cell (not blank)
basically the same way:
Range("a1").End(xlDown).Select although you rarely need to use select, but this illustrates what you want. -- Gary "Eric" wrote in message ... Hello, How do you translate in VBA the selection from the current cell down to the last one (not blank). If I had to do the operation manually in a workbook, I would select the first cell, then hold SHIFT, press END then ARROW DOWN. Thank you. Eric |
Last cell (not blank)
Gary,
This goes to the last cell non blank. How do I "select" from the current cell down to the last cell? The SHIFT part in not translated in Range("a1").End(xlDown).Select. Thank you again. Eric "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... basically the same way: Range("a1").End(xlDown).Select although you rarely need to use select, but this illustrates what you want. -- Gary "Eric" wrote in message ... Hello, How do you translate in VBA the selection from the current cell down to the last one (not blank). If I had to do the operation manually in a workbook, I would select the first cell, then hold SHIFT, press END then ARROW DOWN. Thank you. Eric |
Last cell (not blank)
is this what you want? Range(ActiveCell, ActiveCell.End(xlDown)).Select -- Gary "Eric" wrote in message ... Gary, This goes to the last cell non blank. How do I "select" from the current cell down to the last cell? The SHIFT part in not translated in Range("a1").End(xlDown).Select. Thank you again. Eric "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... basically the same way: Range("a1").End(xlDown).Select although you rarely need to use select, but this illustrates what you want. -- Gary "Eric" wrote in message ... Hello, How do you translate in VBA the selection from the current cell down to the last one (not blank). If I had to do the operation manually in a workbook, I would select the first cell, then hold SHIFT, press END then ARROW DOWN. Thank you. Eric |
Last cell (not blank)
Yes, perfect.
What if I need to include also 3 more columns to the right. Thank you for helping me going through the VBA learning curve... Eric "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... is this what you want? Range(ActiveCell, ActiveCell.End(xlDown)).Select -- Gary "Eric" wrote in message ... Gary, This goes to the last cell non blank. How do I "select" from the current cell down to the last cell? The SHIFT part in not translated in Range("a1").End(xlDown).Select. Thank you again. Eric "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... basically the same way: Range("a1").End(xlDown).Select although you rarely need to use select, but this illustrates what you want. -- Gary "Eric" wrote in message ... Hello, How do you translate in VBA the selection from the current cell down to the last one (not blank). If I had to do the operation manually in a workbook, I would select the first cell, then hold SHIFT, press END then ARROW DOWN. Thank you. Eric |
Last cell (not blank)
That works too. Thanks.
Eric "Don Guillett" wrote in message ... Range(Range("a1"), Range("a1").End(xlDown)).Select -- Don Guillett SalesAid Software "Eric" wrote in message ... Gary, This goes to the last cell non blank. How do I "select" from the current cell down to the last cell? The SHIFT part in not translated in Range("a1").End(xlDown).Select. Thank you again. Eric "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... basically the same way: Range("a1").End(xlDown).Select although you rarely need to use select, but this illustrates what you want. -- Gary "Eric" wrote in message ... Hello, How do you translate in VBA the selection from the current cell down to the last one (not blank). If I had to do the operation manually in a workbook, I would select the first cell, then hold SHIFT, press END then ARROW DOWN. Thank you. Eric |
Last cell (not blank)
try this
Range(Range("a1"), Range("a1").End(xlDown)).Resize(, 3).Select -- Gary "Eric" wrote in message ... Yes, perfect. What if I need to include also 3 more columns to the right. Thank you for helping me going through the VBA learning curve... Eric "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... is this what you want? Range(ActiveCell, ActiveCell.End(xlDown)).Select -- Gary "Eric" wrote in message ... Gary, This goes to the last cell non blank. How do I "select" from the current cell down to the last cell? The SHIFT part in not translated in Range("a1").End(xlDown).Select. Thank you again. Eric "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... basically the same way: Range("a1").End(xlDown).Select although you rarely need to use select, but this illustrates what you want. -- Gary "Eric" wrote in message ... Hello, How do you translate in VBA the selection from the current cell down to the last one (not blank). If I had to do the operation manually in a workbook, I would select the first cell, then hold SHIFT, press END then ARROW DOWN. Thank you. Eric |
All times are GMT +1. The time now is 09:45 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com