Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Hi,
on 'sheet 1' I have several lines of data which is added to all the time. What I want to do is select all the last data entered and paste this into seperate cells on a seperate sheet. eg the last data entered on sheet 1 is held from cells b1-b10 I want to take the data from cell b1 and paste this into 'sheet2' cell ref d30, then the data from b2 on sheet 1 into cell ref f23 on sheet 2, and so on. Once all my selected data has been pasted into my new sheet I wish then to print it on my selected printer, can this be done in VB, if so how many thanks |
#2
![]() |
|||
|
|||
![]()
Anthony
It could be done in VBA but also could be done just using cell referencing. If ranges B1:B10 and D30, F23 etc. do not change just enter......... in sheet2 D30 =sheet1!B1 in sheet2 F23 =sheet1!B2 etc. Enter the data in sheet1 B1:B10 then print sheet2. You could record a macro while setting up sheet2 for printing then run that whenever you want to print. Gord Dibben Excel MVP On Tue, 25 Jan 2005 17:47:02 -0800, "Anthony" wrote: Hi, on 'sheet 1' I have several lines of data which is added to all the time. What I want to do is select all the last data entered and paste this into seperate cells on a seperate sheet. eg the last data entered on sheet 1 is held from cells b1-b10 I want to take the data from cell b1 and paste this into 'sheet2' cell ref d30, then the data from b2 on sheet 1 into cell ref f23 on sheet 2, and so on. Once all my selected data has been pasted into my new sheet I wish then to print it on my selected printer, can this be done in VB, if so how many thanks |
#3
![]() |
|||
|
|||
![]()
Gord,
thanks for ur reply, however the information selected ferom sheet1 will never be from the same cell rows, ie there could be 30 rows of data in sheet1 but I will only wish to use the data which is on the last row can you help futher?? regards Anthony "Gord Dibben" wrote: Anthony It could be done in VBA but also could be done just using cell referencing. If ranges B1:B10 and D30, F23 etc. do not change just enter......... in sheet2 D30 =sheet1!B1 in sheet2 F23 =sheet1!B2 etc. Enter the data in sheet1 B1:B10 then print sheet2. You could record a macro while setting up sheet2 for printing then run that whenever you want to print. Gord Dibben Excel MVP On Tue, 25 Jan 2005 17:47:02 -0800, "Anthony" wrote: Hi, on 'sheet 1' I have several lines of data which is added to all the time. What I want to do is select all the last data entered and paste this into seperate cells on a seperate sheet. eg the last data entered on sheet 1 is held from cells b1-b10 I want to take the data from cell b1 and paste this into 'sheet2' cell ref d30, then the data from b2 on sheet 1 into cell ref f23 on sheet 2, and so on. Once all my selected data has been pasted into my new sheet I wish then to print it on my selected printer, can this be done in VB, if so how many thanks |
#4
![]() |
|||
|
|||
![]()
Sorry about that.
I thought I read that the last data would be in B1:B10 and you wanted B1 copied to D30 and B2 copied to F23 etc. I see now that you want each new row in Column B to be copied. So you want the last cell in Column B to be copied to where? There seems to be no rhyme nor reason to the destination cells D30, F23 etc. It is easy enough to find and copy the last row of data in sheet1, but knowing where to copy it to on sheet2 could be difficult if destination cells are randomly located. To copy last cell in sheet1 column B to next available row sheet2 column D........ Sub CopyIt() Sheets("Sheet1").Cells(Rows.Count, 2).End(xlUp) _ .Copy Destination:=Sheets("Sheet2").Cells(Rows.Count, 4) _ .End(xlUp).Offset(1, 0) End Sub Gord On Wed, 26 Jan 2005 11:57:01 -0800, "Anthony" wrote: Gord, thanks for ur reply, however the information selected ferom sheet1 will never be from the same cell rows, ie there could be 30 rows of data in sheet1 but I will only wish to use the data which is on the last row can you help futher?? regards Anthony "Gord Dibben" wrote: Anthony It could be done in VBA but also could be done just using cell referencing. If ranges B1:B10 and D30, F23 etc. do not change just enter......... in sheet2 D30 =sheet1!B1 in sheet2 F23 =sheet1!B2 etc. Enter the data in sheet1 B1:B10 then print sheet2. You could record a macro while setting up sheet2 for printing then run that whenever you want to print. Gord Dibben Excel MVP On Tue, 25 Jan 2005 17:47:02 -0800, "Anthony" wrote: Hi, on 'sheet 1' I have several lines of data which is added to all the time. What I want to do is select all the last data entered and paste this into seperate cells on a seperate sheet. eg the last data entered on sheet 1 is held from cells b1-b10 I want to take the data from cell b1 and paste this into 'sheet2' cell ref d30, then the data from b2 on sheet 1 into cell ref f23 on sheet 2, and so on. Once all my selected data has been pasted into my new sheet I wish then to print it on my selected printer, can this be done in VB, if so how many thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with data not getting plotted | Charts and Charting in Excel | |||
Pulling data from 1 sheet to another | Excel Worksheet Functions | |||
How do I take data entries and assign them to specific cells that. | Excel Discussion (Misc queries) | |||
Getting specific data from a word document into an excel sheet | Excel Worksheet Functions | |||
How do I retrieve data (specific cells) from multiple worksheets on a shared drive | Excel Worksheet Functions |