+ Reply to Thread
Results 1 to 3 of 3

Macro with non-static column length (name last row?)

  1. #1
    Joe D
    Guest

    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. #2
    Trevor Shuttleworth
    Guest

    Re: Macro with non-static column length (name last row?)

    Joe

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

    Regards

    Trevor


    "Joe D" <[email protected]> wrote in message
    news:[email protected]...
    >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. #3
    Joe D
    Guest

    Re: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1