Moving data from page to page with a button

topher1166

New Member
Joined
Mar 3, 2011
Messages
31
I'm having trouble trying to accomplish a task in a work book I have created.

I have a work book containing a few pages. I'm trying to move a certain "file" (one whole row containing 11 columns of data) out of the current page into an "archive" section on another page IF a certain cell = "complete". This would be triggered with a button/command button.

So what I really want to do is clear the cells and move the content to another sheet. Is this possible? If so, what whould happen to any formuals involved in a move?

Thanks!

Any help would be greatly appreciated.
 
There is no data in column A. Data starts in column B.

By the way, I really appreciate the time and effort you've put in while helping me, thanks a lot.
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Try this

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range, r As Range
Application.EnableEvents = False
For Each c In Target
    If c.Column = 7 And LCase(c.Value) = "completed" Then
        If r Is Nothing Then
            Set r = c
        Else
            Set r = Union(r, c)
        End If
        c.EntireRow.Copy
        Sheets("Archive").Range("B" & Rows.Count).End(xlUp).Offset(1, -1).PasteSpecial Paste:=xlPasteValues
    End If
Next c
If Not r Is Nothing Then r.EntireRow.Delete
Application.EnableEvents = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top