Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Peter Horrocks
 
Posts: n/a
Default 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   Report Post  
Gary''s Student
 
Posts: n/a
Default

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   Report Post  
Paul B
 
Posts: n/a
Default

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" wrote in message
...

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   Report Post  
Peter Horrocks
 
Posts: n/a
Default

Thanks guys - works a treat.

Peter

"Peter Horrocks" wrote in message
...

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
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
Ooh .. Linking a list to a list to an output cell StrawDog Excel Discussion (Misc queries) 4 August 22nd 05 09:51 PM
How do I find the contents of a cell using the "ADDRESS" function. sweeney Excel Worksheet Functions 2 April 5th 05 03:23 AM
cell contents Kevin Excel Discussion (Misc queries) 1 March 8th 05 11:23 AM
Can I use the contents of a cell to satisfy the result_vector arg. robh_2 Excel Worksheet Functions 3 February 24th 05 08:14 PM
Extracting Values on one list and not another B Schwarz Excel Discussion (Misc queries) 4 January 7th 05 01:48 PM


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