ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how do I tell a macro to move to the bottom of a collumn plus one (https://www.excelbanter.com/excel-programming/387415-how-do-i-tell-macro-move-bottom-collumn-plus-one.html)

Macro-Challenged

how do I tell a macro to move to the bottom of a collumn plus one
 
Hello,

Im trying to write a simple macro that determines the bottom end of a
collumn of data, and then down drops down one more row to a blank space.
This would be useful for a situation when you want to tack on more info in a
collumn where you dont necessarily know where the previous list of data ends.

For example I know:

Selection.End(xlDown).Select

this will get me to the last item in a list of data, but not to the next
blank row

How do I tell it (in a macro) to skip down one more space?

Please email me at:

Thank you
Richard S


Gary Keramidas

how do I tell a macro to move to the bottom of a collumn plus one
 
you can try this, but selecting is not a good practice

Selection.End(xlDown).Offset(1).Select

--


Gary


"Macro-Challenged" wrote in message
...
Hello,

Im trying to write a simple macro that determines the bottom end of a
collumn of data, and then down drops down one more row to a blank space.
This would be useful for a situation when you want to tack on more info in a
collumn where you dont necessarily know where the previous list of data ends.

For example I know:

Selection.End(xlDown).Select

this will get me to the last item in a list of data, but not to the next
blank row

How do I tell it (in a macro) to skip down one more space?

Please email me at:

Thank you
Richard S




JLGWhiz

how do I tell a macro to move to the bottom of a collumn plus one
 
Using Selection.End(xlDown).Select is fine as long as there is data in every
cell in the column. If you there is a chance for a blank or two in the
column the maybe this would be better to get you the

ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select

Replace the 1 in Cells(Rows.Count, ?) with the column number or letter you
want to end up in. If you use the letter, be sure to enclose it in quote
marks.

"Macro-Challenged" wrote:

Hello,

Im trying to write a simple macro that determines the bottom end of a
collumn of data, and then down drops down one more row to a blank space.
This would be useful for a situation when you want to tack on more info in a
collumn where you dont necessarily know where the previous list of data ends.

For example I know:

Selection.End(xlDown).Select

this will get me to the last item in a list of data, but not to the next
blank row

How do I tell it (in a macro) to skip down one more space?

Please email me at:

Thank you
Richard S



All times are GMT +1. The time now is 11:47 AM.

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