Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
tc tc is offline
external usenet poster
 
Posts: 40
Default 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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default 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?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Macro not showing in Tools/Macro/Macros yet show up when I goto VBA editor [email protected] Excel Programming 2 March 30th 07 07:48 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 07:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"