+ Reply to Thread
Results 1 to 4 of 4

Copying cell contents to a list

  1. #1
    Peter Horrocks
    Guest

    Copying cell contents to a list


    First of all - apologies if this is in the wrong group. I wasn't sure if it
    should be newusers (which I am) or programming (which I might need).

    I have inherited a lottery syndicate at work after the previous organiser
    retired. He kept an Excel 97 spreadsheet with 8 columns - A (Date), B to G
    (Winning numbers) and H (Bonus number). This list has now grown to about 800
    rows as each draw's numbers are added to the bottom of the list (I will be
    removing about 600). I have adapted the spreadsheet to automatically check
    our numbers against the winning numbers (using HLOOKUP) after I have keyed
    them into the top line of the list.

    My problem is that I want to automatically copy this top line (cells A2:H2)
    to the the next blank row at the bottom of the list (A801:H801) bearing in
    mind that next time it will be A802:H802 etc. I eventually managed to record
    a macro where I can get to the bottom line using
    "Selection.End(xlDown).Select" (thanks to somebody in this group for that!)
    but, even after reading TFM and on-line help, I can't get any further.

    Can anybody please tell me how to drop to the next row and then paste the
    information?

    Thanks,

    Peter



  2. #2
    Gary''s Student
    Guest

    RE: Copying cell contents to a list

    This is not an exact solution, but you can adapt it:

    Sub add_one_on()
    Rows("1:1").Select
    Selection.Copy
    Rows.End(xlDown).Offset(1, 0).Select
    ActiveSheet.Paste
    End Sub

    This will take the first row, copy it, go to the row below the last row and
    paste it. Upon repeated calls, it will continue to add rows to the bottom of
    the sheet.
    --
    Gary''s Student


    "Peter Horrocks" wrote:

    >
    > First of all - apologies if this is in the wrong group. I wasn't sure if it
    > should be newusers (which I am) or programming (which I might need).
    >
    > I have inherited a lottery syndicate at work after the previous organiser
    > retired. He kept an Excel 97 spreadsheet with 8 columns - A (Date), B to G
    > (Winning numbers) and H (Bonus number). This list has now grown to about 800
    > rows as each draw's numbers are added to the bottom of the list (I will be
    > removing about 600). I have adapted the spreadsheet to automatically check
    > our numbers against the winning numbers (using HLOOKUP) after I have keyed
    > them into the top line of the list.
    >
    > My problem is that I want to automatically copy this top line (cells A2:H2)
    > to the the next blank row at the bottom of the list (A801:H801) bearing in
    > mind that next time it will be A802:H802 etc. I eventually managed to record
    > a macro where I can get to the bottom line using
    > "Selection.End(xlDown).Select" (thanks to somebody in this group for that!)
    > but, even after reading TFM and on-line help, I can't get any further.
    >
    > Can anybody please tell me how to drop to the next row and then paste the
    > information?
    >
    > Thanks,
    >
    > Peter
    >
    >
    >


  3. #3
    Paul B
    Guest

    Re: Copying cell contents to a list

    Peter, give this a try,

    Range("A2:H2").Cut Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)


    --
    Paul B
    Always backup your data before trying something new
    Please post any response to the newsgroups so others can benefit from it
    Feedback on answers is always appreciated!
    Using Excel 2002 & 2003

    "Peter Horrocks" <[email protected]> wrote in message
    news:[email protected]...
    >
    > First of all - apologies if this is in the wrong group. I wasn't sure if

    it
    > should be newusers (which I am) or programming (which I might need).
    >
    > I have inherited a lottery syndicate at work after the previous organiser
    > retired. He kept an Excel 97 spreadsheet with 8 columns - A (Date), B to G
    > (Winning numbers) and H (Bonus number). This list has now grown to about

    800
    > rows as each draw's numbers are added to the bottom of the list (I will be
    > removing about 600). I have adapted the spreadsheet to automatically check
    > our numbers against the winning numbers (using HLOOKUP) after I have keyed
    > them into the top line of the list.
    >
    > My problem is that I want to automatically copy this top line (cells

    A2:H2)
    > to the the next blank row at the bottom of the list (A801:H801) bearing in
    > mind that next time it will be A802:H802 etc. I eventually managed to

    record
    > a macro where I can get to the bottom line using
    > "Selection.End(xlDown).Select" (thanks to somebody in this group for

    that!)
    > but, even after reading TFM and on-line help, I can't get any further.
    >
    > Can anybody please tell me how to drop to the next row and then paste the
    > information?
    >
    > Thanks,
    >
    > Peter
    >
    >




  4. #4
    Peter Horrocks
    Guest

    Re: Copying cell contents to a list

    Thanks guys - works a treat.

    Peter

    "Peter Horrocks" <[email protected]> wrote in message
    news:[email protected]...
    >
    > First of all - apologies if this is in the wrong group. I wasn't sure if

    it
    > should be newusers (which I am) or programming (which I might need).
    >
    > I have inherited a lottery syndicate at work after the previous organiser
    > retired. He kept an Excel 97 spreadsheet with 8 columns - A (Date), B to G
    > (Winning numbers) and H (Bonus number). This list has now grown to about

    800
    > rows as each draw's numbers are added to the bottom of the list (I will be
    > removing about 600). I have adapted the spreadsheet to automatically check
    > our numbers against the winning numbers (using HLOOKUP) after I have keyed
    > them into the top line of the list.
    >
    > My problem is that I want to automatically copy this top line (cells

    A2:H2)
    > to the the next blank row at the bottom of the list (A801:H801) bearing in
    > mind that next time it will be A802:H802 etc. I eventually managed to

    record
    > a macro where I can get to the bottom line using
    > "Selection.End(xlDown).Select" (thanks to somebody in this group for

    that!)
    > but, even after reading TFM and on-line help, I can't get any further.
    >
    > Can anybody please tell me how to drop to the next row and then paste the
    > information?
    >
    > Thanks,
    >
    > Peter
    >
    >




+ 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