Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Move to new row in list (2000)

    I want my macro to go to a sheet, then go to the bottom of a column and down one more row to enable a new record to be added to a list.

    How can I do this?

    In Human speak, I would like something like this:
    {goto SummarySheet!$A$5}{end}{down}{down}

    Thanks for your help.

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Move to new row in list (2000)

    In VB:

    worksheets("SummarySheet").select
    range("A5").end (xldown).offset(1,0).select

    I assumed that summary sheet might not be the active sheet.
    Steve

  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Move to new row in list (2000)

    Steve,

    That is perfect, many thanks.

  4. #4
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,826
    Thanks
    136
    Thanked 482 Times in 459 Posts

    Re: Move to new row in list (2000)

    ..but what happens if it's the first new record, i.e. you have nothing under cell [a5]?

    ..you might be better off coming 'up' from the bottom and then offsetting down one row.

    zeddy

  5. #5
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Move to new row in list (2000)

    A great point!. This is also good to do if there might be blank cells in the list. It can be problematic if the dataset is not the only thing thing in those columns.

    worksheets("SummarySheet").select
    range("A65536").end (xlup).offset(1,0).select

    Would be the code.

    Steve

Posting Permissions

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