Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Macro to go to last cell in a column

Currently, I have this simple macro to find the next empty row to paste
input from a user.

Range("B65536").End(xlUp).Offset(1, -1).Select
ActiveSheet.Paste


Works fine. But, I'd like to have it go to a range name, which would be
the column header, then go to row 65536, then up. Something like this:
Application.Goto Reference:="Column Header"
Range("65536").End(xlUp).Offset(1, -1).Select '*** took B out of the
range reference***
ActiveSheet.Paste

I know it won't work like this, since I took the "B" out of the Range.
But, I want to eliminate the column letter reference, in case of a
redesign later, where I move columns.
Can I have it as simple as the original macro above, but without the
column letter?
Thanks,
J.O.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Macro to go to last cell in a column

excelnut1954 wrote:
Currently, I have this simple macro to find the next empty row to paste
input from a user.

Range("B65536").End(xlUp).Offset(1, -1).Select
ActiveSheet.Paste


Works fine. But, I'd like to have it go to a range name, which would be
the column header, then go to row 65536, then up. Something like this:
Application.Goto Reference:="Column Header"
Range("65536").End(xlUp).Offset(1, -1).Select '*** took B out of the
range reference***
ActiveSheet.Paste

I know it won't work like this, since I took the "B" out of the Range.
But, I want to eliminate the column letter reference, in case of a
redesign later, where I move columns.
Can I have it as simple as the original macro above, but without the
column letter?
Thanks,
J.O.

Is there data in every cell to the left of the one you want to paste in?
I don't use named ranges, but how about finding the intersect of
range("a65536").end(xlup).entirerow
and
named_range.entirecolumn?

Nik

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 from cell specific to whole column Bean Counter[_2_] Excel Discussion (Misc queries) 4 May 27th 10 11:04 PM
MACRO HELP, PASTE CELL TO COLUMN Dan Excel Discussion (Misc queries) 0 February 3rd 10 06:34 PM
Macro to go to next blank cell in column RJB Excel Discussion (Misc queries) 3 February 28th 07 04:51 PM
Need the formula or macro. If i enter today date in the cell (Row 1,Column 2) and on tab out, the column 1 cell should be filled with "corresponding Day" of the date kakasay Excel Discussion (Misc queries) 1 January 22nd 07 12:31 PM
Need Formula or macro. If i enter today date in the cell (Row 1,Column 2) and on tab out, the column 1 cell should be filled with "corresponding Day" of the date kakasay Excel Discussion (Misc queries) 1 January 22nd 07 12:31 PM


All times are GMT +1. The time now is 08:11 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"