![]() |
Macro to go to the last value
Hi. How do i create a macro that will go to the last value in a given
column? |
Macro to go to the last value
Hi,
This retuens the last value in column A Sub stantial() myvalue = Range("A" & Cells(Cells.Rows.Count, "A").End(xlUp).Row).Value End Sub This selects the last value on column A Sub stantial() Range("A" & Cells(Cells.Rows.Count, "A").End(xlUp).Row).Select End Sub Mike "tc" wrote: Hi. How do i create a macro that will go to the last value in a given column? |
Macro to go to the last value
Hello
Use the macro recorder: Tools, Macro, New Macro Input a name for your macro Validate with OK Press both Ctrl and End keys Stop the recorder Check the vba code written in the new module created. HTH Cordially Pascal "tc" a écrit dans le message de news: ... Hi. How do i create a macro that will go to the last value in a given column? |
Macro to go to the last value
to select the last occupied cell in column A:
n = Cells(Rows.Count, "A").End(xlUp).Row Cells(n, "A").Select -- Gary''s Student - gsnu200744 "tc" wrote: Hi. How do i create a macro that will go to the last value in a given column? |
All times are GMT +1. The time now is 08:13 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com