Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Macro with non-static column length (name last row?)

I have a workbook that in column A has a list of dates (for example: A2
= sept 1, A3 = sept 2, and so on). My macro then enters a list of names
into column B (for example: B2 = "bob, jim, john", B3 = "todd, bill,
susan, bob").

My code copies the data from a bunch of other workbooks and pastes it
all in column B. However, every month I have to go in to the code and
change the range that the names are copied from (for example, from
"B2:B32" to "B2:B33").

I would rather rename the last row to "end" and then cut and paste from
range "B2:Bend". How do I do this?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Macro with non-static column length (name last row?)

Joe

Range("B2:B" & Range("B65536").End(xlUp).Row)

Regards

Trevor


"Joe D" wrote in message
oups.com...
I have a workbook that in column A has a list of dates (for example: A2
= sept 1, A3 = sept 2, and so on). My macro then enters a list of names
into column B (for example: B2 = "bob, jim, john", B3 = "todd, bill,
susan, bob").

My code copies the data from a bunch of other workbooks and pastes it
all in column B. However, every month I have to go in to the code and
change the range that the names are copied from (for example, from
"B2:B32" to "B2:B33").

I would rather rename the last row to "end" and then cut and paste from
range "B2:Bend". How do I do this?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Macro with non-static column length (name last row?)

Thanks, I did not think that was going to be so easy. How does that
work?

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
Concatenating two variable fields into a static length text field Young Programmer Lad Excel Worksheet Functions 2 April 17th 09 05:39 PM
Using a Macro to Sum a Variable-Length Range (a Column) Chuckles123[_15_] Excel Programming 0 October 5th 04 06:46 AM
Using a Macro to Sum a Variable-Length Range (a Column) Chuckles123[_10_] Excel Programming 1 October 5th 04 05:54 AM
Using a Macro to Sum a Variable-Length Range (a Column) Chuckles123[_9_] Excel Programming 2 October 5th 04 12:34 AM
Using a Macro to Sum a Variable-Length Range (a Column) Chuckles123[_2_] Excel Programming 1 October 3rd 04 11:51 PM


All times are GMT +1. The time now is 07:29 AM.

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"