Moving data between worksheets ...

Hi,

Wonder if someone can help me please?

I have a sheet in a workbook called "Sheet1" (please see
www.iedmont.blogspot.com/) and what I am trying to do is move all rows
that contain a date into a separate sheet within the workbook called
"JanArchive".

"JanArchive" already contains archived entries and I would like to
combine the data from "Sheet1" with the data from "JanArchive".

Can anyone offer any suggestions how to do this please?

Many thanks for your time.

Ian Edmont.

0
iedmont (11)
1/19/2006 8:21:48 AM
excel.misc 78881 articles. 5 followers. Follow

5 Replies
848 Views

Similar Articles

[PageSpeed] 24

Select cells in sheet which you wish to move.  From Menus pick Edit then
the cut option (you can also use your right mouse button for the
shortcut menus which will bring up these options)

Go to sheet where you want the information to appear.

Select (or right click) in first availble cell and choose paste.

If you are a bit worried that you might loose your information from
sheet 1 while doing this, then you could always choose the copy option
under edit instead, then go back and delete either the information or
the sheet if no longer needed.


-- 
jujuwillis
------------------------------------------------------------------------
jujuwillis's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2123
View this thread: http://www.excelforum.com/showthread.php?threadid=502809

0
1/19/2006 8:49:38 AM
Try this:

Option Explicit

Const csz_dst_sheet As String = "JanArchive"
Const csz_src_sheet As String = "Sheet1"

Sub movedata()
Dim wsd As Worksheet 'dst worksheet
Dim wss As Worksheet 'src worksheet
Dim rd As Long ' dst row
Dim rs As Long ' src row

Set wsd = ActiveWorkbook.Worksheets(csz_dst_sheet)
Set wss = ActiveWorkbook.Worksheets(csz_src_sheet)

'find last row on dst
rd = 2
While wsd.Cells(rd, 1) <> ""
    rd = rd + 1
Wend

rs = 2
While wss.Cells(rs, 1) <> ""
    If wss.Cells(rs, 2) <> "" Then
        wss.Rows(rs).Copy Destination:=wsd.Rows(rd)
        rd = rd + 1
    End If
    rs = rs + 1
Wend
Set wss = Nothing
Set wsd = Nothing
End Sub
'------------
-- 
HTHs Martin


"Ian Edmont" wrote:

> Hi,
> 
> Wonder if someone can help me please?
> 
> I have a sheet in a workbook called "Sheet1" (please see
> www.iedmont.blogspot.com/) and what I am trying to do is move all rows
> that contain a date into a separate sheet within the workbook called
> "JanArchive".
> 
> "JanArchive" already contains archived entries and I would like to
> combine the data from "Sheet1" with the data from "JanArchive".
> 
> Can anyone offer any suggestions how to do this please?
> 
> Many thanks for your time.
> 
> Ian Edmont.
> 
> 
0
1/19/2006 8:56:03 AM
Thanks for that Martin, it worked fine however it leaves the rows on
Sheet1 in place.

Is there a way to delete the rows from Sheet1 after they have been
transferred to JanArchive?

Many thanks.

Ian Edmont.


Martin Fishlock wrote:

> Try this:
>
> Option Explicit
>
> Const csz_dst_sheet As String = "JanArchive"
> Const csz_src_sheet As String = "Sheet1"
>
> Sub movedata()
> Dim wsd As Worksheet 'dst worksheet
> Dim wss As Worksheet 'src worksheet
> Dim rd As Long ' dst row
> Dim rs As Long ' src row
>
> Set wsd = ActiveWorkbook.Worksheets(csz_dst_sheet)
> Set wss = ActiveWorkbook.Worksheets(csz_src_sheet)
>
> 'find last row on dst
> rd = 2
> While wsd.Cells(rd, 1) <> ""
>     rd = rd + 1
> Wend
>
> rs = 2
> While wss.Cells(rs, 1) <> ""
>     If wss.Cells(rs, 2) <> "" Then
>         wss.Rows(rs).Copy Destination:=wsd.Rows(rd)
>         rd = rd + 1
>     End If
>     rs = rs + 1
> Wend
> Set wss = Nothing
> Set wsd = Nothing
> End Sub
> '------------
> --
> HTHs Martin
>
>
> "Ian Edmont" wrote:
>
> > Hi,
> >
> > Wonder if someone can help me please?
> >
> > I have a sheet in a workbook called "Sheet1" (please see
> > www.iedmont.blogspot.com/) and what I am trying to do is move all rows
> > that contain a date into a separate sheet within the workbook called
> > "JanArchive".
> >
> > "JanArchive" already contains archived entries and I would like to
> > combine the data from "Sheet1" with the data from "JanArchive".
> >
> > Can anyone offer any suggestions how to do this please?
> > 
> > Many thanks for your time.
> > 
> > Ian Edmont.
> > 
> >

0
iedmont (11)
1/19/2006 9:06:08 AM
Ian on the second loop modify it as thus:

rs = 2
While wss.Cells(rs, 1) <> ""
       If wss.Cells(rs, 2) <> "" Then
            wss.Rows(rs).Copy Destination:=wsd.Rows(rd)
            wss.rows(rs).Delete
             rd = rd + 1
        else
            rs = rs + 1
       End If
Wend

-- 
HTHs Martin


"Ian Edmont" wrote:

> Thanks for that Martin, it worked fine however it leaves the rows on
> Sheet1 in place.
> 
> Is there a way to delete the rows from Sheet1 after they have been
> transferred to JanArchive?
> 
> Many thanks.
> 
> Ian Edmont.
> 
> 
> Martin Fishlock wrote:
> 
> > Try this:
> >
> > Option Explicit
> >
> > Const csz_dst_sheet As String = "JanArchive"
> > Const csz_src_sheet As String = "Sheet1"
> >
> > Sub movedata()
> > Dim wsd As Worksheet 'dst worksheet
> > Dim wss As Worksheet 'src worksheet
> > Dim rd As Long ' dst row
> > Dim rs As Long ' src row
> >
> > Set wsd = ActiveWorkbook.Worksheets(csz_dst_sheet)
> > Set wss = ActiveWorkbook.Worksheets(csz_src_sheet)
> >
> > 'find last row on dst
> > rd = 2
> > While wsd.Cells(rd, 1) <> ""
> >     rd = rd + 1
> > Wend
> >
> > rs = 2
> > While wss.Cells(rs, 1) <> ""
> >     If wss.Cells(rs, 2) <> "" Then
> >         wss.Rows(rs).Copy Destination:=wsd.Rows(rd)
> >         rd = rd + 1
> >     End If
> >     rs = rs + 1
> > Wend
> > Set wss = Nothing
> > Set wsd = Nothing
> > End Sub
> > '------------
> > --
> > HTHs Martin
> >
> >
> > "Ian Edmont" wrote:
> >
> > > Hi,
> > >
> > > Wonder if someone can help me please?
> > >
> > > I have a sheet in a workbook called "Sheet1" (please see
> > > www.iedmont.blogspot.com/) and what I am trying to do is move all rows
> > > that contain a date into a separate sheet within the workbook called
> > > "JanArchive".
> > >
> > > "JanArchive" already contains archived entries and I would like to
> > > combine the data from "Sheet1" with the data from "JanArchive".
> > >
> > > Can anyone offer any suggestions how to do this please?
> > > 
> > > Many thanks for your time.
> > > 
> > > Ian Edmont.
> > > 
> > >
> 
> 
0
1/19/2006 9:23:03 AM
Thanks very much Martin. Exactly what I needed.

Ian Edmont.


Martin Fishlock wrote:

> Ian on the second loop modify it as thus:
>
> rs = 2
> While wss.Cells(rs, 1) <> ""
>        If wss.Cells(rs, 2) <> "" Then
>             wss.Rows(rs).Copy Destination:=wsd.Rows(rd)
>             wss.rows(rs).Delete
>              rd = rd + 1
>         else
>             rs = rs + 1
>        End If
> Wend
>
> --
> HTHs Martin
>
>
> "Ian Edmont" wrote:
>
> > Thanks for that Martin, it worked fine however it leaves the rows on
> > Sheet1 in place.
> >
> > Is there a way to delete the rows from Sheet1 after they have been
> > transferred to JanArchive?
> >
> > Many thanks.
> >
> > Ian Edmont.
> >
> >
> > Martin Fishlock wrote:
> >
> > > Try this:
> > >
> > > Option Explicit
> > >
> > > Const csz_dst_sheet As String = "JanArchive"
> > > Const csz_src_sheet As String = "Sheet1"
> > >
> > > Sub movedata()
> > > Dim wsd As Worksheet 'dst worksheet
> > > Dim wss As Worksheet 'src worksheet
> > > Dim rd As Long ' dst row
> > > Dim rs As Long ' src row
> > >
> > > Set wsd = ActiveWorkbook.Worksheets(csz_dst_sheet)
> > > Set wss = ActiveWorkbook.Worksheets(csz_src_sheet)
> > >
> > > 'find last row on dst
> > > rd = 2
> > > While wsd.Cells(rd, 1) <> ""
> > >     rd = rd + 1
> > > Wend
> > >
> > > rs = 2
> > > While wss.Cells(rs, 1) <> ""
> > >     If wss.Cells(rs, 2) <> "" Then
> > >         wss.Rows(rs).Copy Destination:=wsd.Rows(rd)
> > >         rd = rd + 1
> > >     End If
> > >     rs = rs + 1
> > > Wend
> > > Set wss = Nothing
> > > Set wsd = Nothing
> > > End Sub
> > > '------------
> > > --
> > > HTHs Martin
> > >
> > >
> > > "Ian Edmont" wrote:
> > >
> > > > Hi,
> > > >
> > > > Wonder if someone can help me please?
> > > >
> > > > I have a sheet in a workbook called "Sheet1" (please see
> > > > www.iedmont.blogspot.com/) and what I am trying to do is move all rows
> > > > that contain a date into a separate sheet within the workbook called
> > > > "JanArchive".
> > > >
> > > > "JanArchive" already contains archived entries and I would like to
> > > > combine the data from "Sheet1" with the data from "JanArchive".
> > > >
> > > > Can anyone offer any suggestions how to do this please?
> > > >
> > > > Many thanks for your time.
> > > > 
> > > > Ian Edmont.
> > > > 
> > > >
> > 
> >

0
iedmont (11)
1/19/2006 9:32:34 AM
Reply:

Similar Artilces:

space between y axis and data points..
I have a line graph with markers, and am plotting 7 pre-post (x axis) lines on a y axis of 1 to 100. By default, the "pre" points were plotted right on the y axis and the post points were all the way at the right end of the plot area. I checked "Value (y) axis crosses between categories", and this moves the pre (and post) towards the middle of the plot area, so that the points are now plotted to the right of the y axis. My question is, can I adjust the space between the y axis and where the "pre" data points are plotted? As they are now, there is too much of a g...

Allow comments to be added to protected worksheet?
I have created a worsksheet with selected areas locked and then protected it. My users want to be able to add comments where necessary but are not able to. I cant seem to find anything in the help menu - any ideas? When protecting the sheet "allow users to:" Select unlocked cells and Edit Objects. Note: with edit objects checked, users can insert comments in locked cells if they are allowed to select those. Gord Dibben MS Excel MVP On Wed, 4 Nov 2009 15:00:02 -0800, sue@solotel <suesolotel@discussions.microsoft.com> wrote: >I have created a worsksheet with sel...

copy cells from one worksheet to another
How do I make the "value" or content of a cell on 'worksheet 1' mirror or copy the font color (and strike through) of a cell on a seperate worksheet? - 'worksheet 2'? thanks. Copy and paste special|values followed by Paste special|formats If you were using a formula, then that formula can only return the value--it can't change the format. Depending on how that other cell changed, you could have an event macro do the work for you. Garrett wrote: > > How do I make the "value" or content of a cell on 'worksheet 1' mirror or > copy ...

Moving license to a new computer
I bought a powerbook and am giving the kids my old imac. I'd like to move Office to the powerbook and remove it from the imac. Am I going to run into any technical difficulties doing this? In article <do3en0hjuiv1jrgsan1tlf23demblohh9p@4ax.com>, Andrew D <andrew.davilman@mindspring.com> wrote: > I bought a powerbook and am giving the kids my old imac. I'd like to > move Office to the powerbook and remove it from the imac. Am I going > to run into any technical difficulties doing this? Shouldn't. Run the Remove Office application on the iMac, and inst...

Bring filtered data from another file
I have a Birthdays file I have a Calendar file After each date in this calendar file I have 4 empty lines (assumption: max 4 birthdays on the same day) 15.01.2010 ......... ......... ......... ......... 16.01.2010 ......... ......... ......... ......... How can I bring the names for each date from the Birthdays file. Thanks and regards, CousinExcel ...

How do I print grid lines in a spreadsheet if no data is entered .
I am trying to create a form and need to print the grid lines as a part of the form. Others will use this form and make pencil entries in the cells which will be entered into the spreadsheet at a later date. How do I do this? I am using Office 2003. Many thanks---Justaone Just File>Page Setup>Sheet. Check "gridlines" and make sure "draft quality" is not checked. May be easier and more readable to have borders around just those cells that will be pencil-entered. If you go that route, uncheck "gridlines" in Page Setup. Gord Dibben Excel MVP On Sun, 2...

not able to move FLAG STATUS column in Outlook 2003
I tried to move FLAG STATUS column from the very right side to the left side when I am in my Inbox. IT WON'T LET ME!! Anyone was able to do that? No. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, Kenny Shu asked: | I tried to move FLAG STATUS column from the very right | side to the left side when I am in my Inbox. IT WON'T LET | ME!! | | Anyone was abl...

Hyperlink a Visio shape to a worksheet
I have a Visio diagram that represents the computers in ou computer/server room. I want to create hyperlinks from each of th shapes that represents a server (for example) to a correspondin worksheet in a workbook. I can get the hyperlink to open the workbook, but I can't figure ou how to drill down to the specific worksheet for a particular server. Thanks in advance, Jef -- Message posted from http://www.ExcelForum.com not tested but try adding the sheet name with workbookpath+name#sheet1 -- Regards Frank Kabel Frankfurt, Germany > I have a Visio diagram that represents the ...

Safe to Move?
Hello, I remember seeing an article about moving $NtServicePackUninstall$ files to free up space. I think it was for Windows 2000 Server. Is it possible to do this for Windows 2003 server? -- Thank you for your help! JYC Hello Mr. JYC, Yes, you can do it and if are sure that there is no need to uninstall it you can delete it. Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights. ** Please do NOT email, only reply to Newsgroups ** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.ht...

Creating a new worksheet from a template
I would like to press a button on one worksheet and create a ne worksheet that conforms to a template. However: 1) this is for a series of people who do not work centrally and who ar not technical i.e. the solution needs to be self-contained within m workbook and not involve the creation of xlst templates that have t sit in a certain place on the hard drive. 2) These worksheets will have a series of fields that relate t 'activities'. The user can chose to spawn worksheets for one or mor activities. I would like a summary sheet to add all the activit information from as many activit...

Conv Access 97->2000-Gets a method or data member not found error
For the following code which compiles and runs successfully in MS Access 97, when converting to MS Access 2000 the following compile error occurs "Method or data member not found." for the line below. tempID = rs.[UserID] UserID is a field in the tblSecurity table. It seems that the tblSecurity table is not opening in MS Access 2000 since this error will occur using any field, not just UserID. This error does not occur in MS Access 97. PLEASE HELP. The routine is displayed below. Sincerely thanks, Phil ------------------ CODE - Shown Below ------------------ Private Sub...

Live Mail,I can't move message "unknown Error" appears
-- There are several messages that I want to place in folders, but when I try to move them, I receive the message "Unable to move, Unknown Error". This is more than annoying, as these are important messages from various organizations I belong to. I like to archive these within the confines of Live Mail, and I don't want to hve to go in and out to various folders. Any help will be appreciated. Windows Live Mail Newsgroup. In your newsreader: news://msnews.microsoft.com/microsoft.public.windows.live.mail.desktop On the Web: http://www.microsoft.com/communiti...

Copy or Move row on condition to different and/or multiple sheets
Good afternoon. I'm new to the world of programming in excel but have programmed elsewhere previously. What i am trying to do is to have a todo list setup, ive searched long and hard and can't find anything that quite fits my bill that i can replicate and alter to work so am asking for some assistance. I have a workbook with six sheets, All Jobs, Evaluation, Authority, In Progress, Completed and a helper sheet. In all jobs i have 9 columns A-I (atm A being spare) that have information that i need to show. In column 'I' i have a dropdown box using the helper sheet for p...

Moving Exchange 2000
Hi, I have a exchange 2000 server running on windows 2000 which I need to move onto a new server/hardware but cannot find techincal documents telling me how to do this. The only documents I can find are on disaster recovery which doesnt seem to cover moving exchange across onto new hardware. Does anybody have some a document ??? Also I would like to run exchange 2000 on server 2003, I'm guessing that this won't be a problem to move it onto new hardware running server 2003 ?? Kind Regards Paul... Use the move-server method detailed here: http://tinyurl.com/ys7e9 -- Neil H...

Go to section of all worksheets
I have set the following macro to unhide column Y in all sheets. Dim sh As Worksheet For Each sh In Sheets(Array("sheet1", "sheet2", "sheet3")) sh.Columns("X:Z").EntireColumn.Hidden = False Range("H7").Select Next However, how do I also get it to select sell H7 and also scroll to the top left of the workbook in all sheets? One way: Dim sh As Worksheet Application.ScreenUpdating = False For Each sh In Sheets(Array("sheet1", "sheet2", "sheet3")) With ...

Read Receipts won't move to 'delete bin' after processing
Very simply, my read receipts won't move to 'delete bin' after they are processed. This doesn't seem like a complex process. The tracking option allows me to either turn this rule on or off. What else am I supposed to do? I have receipts all over the place and I end up deleteting them manually. Hy, You have to delete it by yourself. It wont work with a rule. >-----Original Message----- >Very simply, my read receipts won't move to 'delete bin' after they are processed. This doesn't seem like a complex process. The tracking option allows me to either ...

mail moved from netscape to outlook?
Hello! I would like to know is it possible to move the mails from netscape mail to outlook? And what is the way? Thanks! >-----Original Message----- >Hello! I would like to know is it possible to move the >mails from netscape mail to outlook? And what is the way? >Thanks! >. > <anonymous@discussions.microsoft.com> wrote in message news:d08901c3efb2$759a75e0$a101280a@phx.gbl... > > >-----Original Message----- > >Hello! I would like to know is it possible to move the > >mails from netscape mail to outlook? And what is the way? > >Thanks! ...

made sheet , cant get back to data!
I made a graphic "sheet" and now the graph seems to Own the world; I can see the 'source data' but I cannot get back to the original data so I can sort it before making the chart. Ack! Rick Merrill wrote: > I made a graphic "sheet" and now the graph seems > to Own the world; I can see the 'source data' but > I cannot get back to the original data so I can > sort it before making the chart. Ah ha! I turned it into a piece of the original sheet and now I can sort the data! ...

Moving Pages between two publications
How can I move several entire pages from one document to another? Not simply the content of the page, but the format as well as positioning? Select all the elements on one of the pages and Group them together (a little icon will appear at the bottom of the bounding box - click it to lock the group) before you Copy and paste to the other publication. "FrankDe" <FrankDe@discussions.microsoft.com> wrote in message news:B2DF180E-4973-43D3-8278-7EDDF897EA60@microsoft.com... | How can I move several entire pages from one document to another? Not simply | the content of the ...

Move mailbox rights in Exchange 5.5 #2
What is the most restrictive set of rights that would allow an administrator to move mailboxes between 2 servers in the same site? Providing the administrator an admin role on the Servers container, on each server, or on the Private/Public Information Store gives him undesired privileges (like changing default storage limits). Thanks in advance for any assistance. ...

Protecting worksheet
Hi I have protected a worksheet but when I scroll up too far up to the top or too far left instead of stopping there it takes me of to a different part of the spreadsheet. Does anyone know how to stop this? Dawn Look at freezing the pane to keep certain rows and/or columns from scrolling off of the screen. Excel 2003 and earlier: Window --> Freeze Panes Excel 2007: [View] tab, "Window Group", Freeze Panes pulldown. "Patricia" wrote: > Hi > > I have protected a worksheet but when I scroll up too far up to the top or > too far ...

Importing Data Files
Hey all, I have recently had to undergo a clean install of Windows XP onto a new Computer, and am having trouble importing all my MS Outlook XP data into XP (from 98SE). Thanks, -- Daniel Becroft ; ================================= "Real computer scientists don't comment their code. The identifiers are so long they can't afford the disk space." "Blue sparks and white smoke, the two most expensive components of any electrical system, and once used up will cost a fortune to replace." What is the exact issue? You can connect to the file by File -> Open -> ...

Creating Purchase order worksheets in HQ through rules
I would like put some code in a web service in order to create a purchase order work sheet. Could I access to work sheets logic using qsrules to construct a worksheet? I looking for a method like QSRULES.CreatePOWorkSheet Thank you Oscar ...

Move users from none Business Unit to other
hi, is it possible to move a user from one business unit to other ? Yes it is. However when you move them they will lose their security role so you will need to add a security role to their user record "M. Ceccacci" <anonymous@discussions.microsoft.com> wrote in message news:D9C93DCE-6400-4C1F-BE36-C86832BA9DCD@microsoft.com... > hi, is it possible to move a user from one business unit to other ? should have said!! to do this go to settings, business units, users then open up the users record then click actions - change business unit. once done make sure you reassign...

Does Excel data merge with .mrg documents?
I run a database for my company, and always have a difficult (read - lots of hand typing) time getting my .mrg data doc to merge with Excel. Most times Exel will have all the data in one cell (making it impossible to sort), or not come through at all. Is it just me, or does Excel not work well with this kind of document. ...