PC Review


Reply
Thread Tools Rate Thread

Copy Row Paste Row (Seperate Sheet)

 
 
=?Utf-8?B?QmVueg==?=
Guest
Posts: n/a
 
      20th Nov 2006
Hello,

I have what I would imagine to be a pretty simple question. I'm having
trouble getting a macro to copy the selected row in sheet "A" and paste in
the first available row in sheet "B" and then delete the content from the
original row in Sheet "A". I can just almost get it but not quiet. Thank
you to anyone that helps.
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      20th Nov 2006
Pretty easy but, as always, post YOUR coding efforts for comments

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Benz" <(E-Mail Removed)> wrote in message
news:CBA70555-13F3-4B53-AE20-(E-Mail Removed)...
> Hello,
>
> I have what I would imagine to be a pretty simple question. I'm having
> trouble getting a macro to copy the selected row in sheet "A" and paste in
> the first available row in sheet "B" and then delete the content from the
> original row in Sheet "A". I can just almost get it but not quiet. Thank
> you to anyone that helps.



 
Reply With Quote
 
=?Utf-8?B?QmVueg==?=
Guest
Posts: n/a
 
      20th Nov 2006
Sorry,

Code:

Sub TESTINGTRANSFER()
Selection.Copy
Sheets("A").Select
Selection.Select
Sheets("B").Select.Range("A1").End(xlDown).Offset(1, 0).Paste
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
End Sub

Thanks Don.

"Don Guillett" wrote:

> Pretty easy but, as always, post YOUR coding efforts for comments
>
> --
> Don Guillett
> SalesAid Software
> (E-Mail Removed)
> "Benz" <(E-Mail Removed)> wrote in message
> news:CBA70555-13F3-4B53-AE20-(E-Mail Removed)...
> > Hello,
> >
> > I have what I would imagine to be a pretty simple question. I'm having
> > trouble getting a macro to copy the selected row in sheet "A" and paste in
> > the first available row in sheet "B" and then delete the content from the
> > original row in Sheet "A". I can just almost get it but not quiet. Thank
> > you to anyone that helps.

>
>
>

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      20th Nov 2006
This will fail if there is nothing after a1 so you may prefer

..cells(rows.count,"a").end(xlup).row+1

Sub TESTINGTRANSFER()
Selection.EntireRow.Cut Destination:= _
Sheets("sheet18").Range("A1").End(xlDown).Offset(1)
End Sub

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Benz" <(E-Mail Removed)> wrote in message
news:469DAE82-DB2E-4A15-9538-(E-Mail Removed)...
> Sorry,
>
> Code:
>
> Sub TESTINGTRANSFER()
> Selection.Copy
> Sheets("A").Select
> Selection.Select
> Sheets("B").Select.Range("A1").End(xlDown).Offset(1, 0).Paste
> Application.CutCopyMode = False
> Selection.Delete Shift:=xlUp
> End Sub
>
> Thanks Don.
>
> "Don Guillett" wrote:
>
>> Pretty easy but, as always, post YOUR coding efforts for comments
>>
>> --
>> Don Guillett
>> SalesAid Software
>> (E-Mail Removed)
>> "Benz" <(E-Mail Removed)> wrote in message
>> news:CBA70555-13F3-4B53-AE20-(E-Mail Removed)...
>> > Hello,
>> >
>> > I have what I would imagine to be a pretty simple question. I'm having
>> > trouble getting a macro to copy the selected row in sheet "A" and paste
>> > in
>> > the first available row in sheet "B" and then delete the content from
>> > the
>> > original row in Sheet "A". I can just almost get it but not quiet.
>> > Thank
>> > you to anyone that helps.

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?QmVueg==?=
Guest
Posts: n/a
 
      20th Nov 2006
When I try that I get the error; "Application - defined or object - defined
error"

"Don Guillett" wrote:

> This will fail if there is nothing after a1 so you may prefer
>
> ..cells(rows.count,"a").end(xlup).row+1
>
> Sub TESTINGTRANSFER()
> Selection.EntireRow.Cut Destination:= _
> Sheets("sheet18").Range("A1").End(xlDown).Offset(1)
> End Sub
>
> --
> Don Guillett
> SalesAid Software
> (E-Mail Removed)
> "Benz" <(E-Mail Removed)> wrote in message
> news:469DAE82-DB2E-4A15-9538-(E-Mail Removed)...
> > Sorry,
> >
> > Code:
> >
> > Sub TESTINGTRANSFER()
> > Selection.Copy
> > Sheets("A").Select
> > Selection.Select
> > Sheets("B").Select.Range("A1").End(xlDown).Offset(1, 0).Paste
> > Application.CutCopyMode = False
> > Selection.Delete Shift:=xlUp
> > End Sub
> >
> > Thanks Don.
> >
> > "Don Guillett" wrote:
> >
> >> Pretty easy but, as always, post YOUR coding efforts for comments
> >>
> >> --
> >> Don Guillett
> >> SalesAid Software
> >> (E-Mail Removed)
> >> "Benz" <(E-Mail Removed)> wrote in message
> >> news:CBA70555-13F3-4B53-AE20-(E-Mail Removed)...
> >> > Hello,
> >> >
> >> > I have what I would imagine to be a pretty simple question. I'm having
> >> > trouble getting a macro to copy the selected row in sheet "A" and paste
> >> > in
> >> > the first available row in sheet "B" and then delete the content from
> >> > the
> >> > original row in Sheet "A". I can just almost get it but not quiet.
> >> > Thank
> >> > you to anyone that helps.
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      20th Nov 2006
This will fail if there is nothing after a1 so you may prefer
>
> ..cells(rows.count,"a").end(xlup).row+1



--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Benz" <(E-Mail Removed)> wrote in message
news:652C2B82-859B-4793-B2BA-(E-Mail Removed)...
> When I try that I get the error; "Application - defined or object -
> defined
> error"
>
> "Don Guillett" wrote:
>
>> This will fail if there is nothing after a1 so you may prefer
>>
>> ..cells(rows.count,"a").end(xlup).row+1
>>
>> Sub TESTINGTRANSFER()
>> Selection.EntireRow.Cut Destination:= _
>> Sheets("sheet18").Range("A1").End(xlDown).Offset(1)
>> End Sub
>>
>> --
>> Don Guillett
>> SalesAid Software
>> (E-Mail Removed)
>> "Benz" <(E-Mail Removed)> wrote in message
>> news:469DAE82-DB2E-4A15-9538-(E-Mail Removed)...
>> > Sorry,
>> >
>> > Code:
>> >
>> > Sub TESTINGTRANSFER()
>> > Selection.Copy
>> > Sheets("A").Select
>> > Selection.Select
>> > Sheets("B").Select.Range("A1").End(xlDown).Offset(1, 0).Paste
>> > Application.CutCopyMode = False
>> > Selection.Delete Shift:=xlUp
>> > End Sub
>> >
>> > Thanks Don.
>> >
>> > "Don Guillett" wrote:
>> >
>> >> Pretty easy but, as always, post YOUR coding efforts for comments
>> >>
>> >> --
>> >> Don Guillett
>> >> SalesAid Software
>> >> (E-Mail Removed)
>> >> "Benz" <(E-Mail Removed)> wrote in message
>> >> news:CBA70555-13F3-4B53-AE20-(E-Mail Removed)...
>> >> > Hello,
>> >> >
>> >> > I have what I would imagine to be a pretty simple question. I'm
>> >> > having
>> >> > trouble getting a macro to copy the selected row in sheet "A" and
>> >> > paste
>> >> > in
>> >> > the first available row in sheet "B" and then delete the content
>> >> > from
>> >> > the
>> >> > original row in Sheet "A". I can just almost get it but not quiet.
>> >> > Thank
>> >> > you to anyone that helps.
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?QmVueg==?=
Guest
Posts: n/a
 
      20th Nov 2006
When I tried that is when I receive the error.

"Don Guillett" wrote:

> This will fail if there is nothing after a1 so you may prefer
> >
> > ..cells(rows.count,"a").end(xlup).row+1

>
>
> --
> Don Guillett
> SalesAid Software
> (E-Mail Removed)
> "Benz" <(E-Mail Removed)> wrote in message
> news:652C2B82-859B-4793-B2BA-(E-Mail Removed)...
> > When I try that I get the error; "Application - defined or object -
> > defined
> > error"
> >
> > "Don Guillett" wrote:
> >
> >> This will fail if there is nothing after a1 so you may prefer
> >>
> >> ..cells(rows.count,"a").end(xlup).row+1
> >>
> >> Sub TESTINGTRANSFER()
> >> Selection.EntireRow.Cut Destination:= _
> >> Sheets("sheet18").Range("A1").End(xlDown).Offset(1)
> >> End Sub
> >>
> >> --
> >> Don Guillett
> >> SalesAid Software
> >> (E-Mail Removed)
> >> "Benz" <(E-Mail Removed)> wrote in message
> >> news:469DAE82-DB2E-4A15-9538-(E-Mail Removed)...
> >> > Sorry,
> >> >
> >> > Code:
> >> >
> >> > Sub TESTINGTRANSFER()
> >> > Selection.Copy
> >> > Sheets("A").Select
> >> > Selection.Select
> >> > Sheets("B").Select.Range("A1").End(xlDown).Offset(1, 0).Paste
> >> > Application.CutCopyMode = False
> >> > Selection.Delete Shift:=xlUp
> >> > End Sub
> >> >
> >> > Thanks Don.
> >> >
> >> > "Don Guillett" wrote:
> >> >
> >> >> Pretty easy but, as always, post YOUR coding efforts for comments
> >> >>
> >> >> --
> >> >> Don Guillett
> >> >> SalesAid Software
> >> >> (E-Mail Removed)
> >> >> "Benz" <(E-Mail Removed)> wrote in message
> >> >> news:CBA70555-13F3-4B53-AE20-(E-Mail Removed)...
> >> >> > Hello,
> >> >> >
> >> >> > I have what I would imagine to be a pretty simple question. I'm
> >> >> > having
> >> >> > trouble getting a macro to copy the selected row in sheet "A" and
> >> >> > paste
> >> >> > in
> >> >> > the first available row in sheet "B" and then delete the content
> >> >> > from
> >> >> > the
> >> >> > original row in Sheet "A". I can just almost get it but not quiet.
> >> >> > Thank
> >> >> > you to anyone that helps.
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      20th Nov 2006
copy/paste your entire code here

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Benz" <(E-Mail Removed)> wrote in message
news:49942563-11DD-4BAF-98B8-(E-Mail Removed)...
> When I tried that is when I receive the error.
>
> "Don Guillett" wrote:
>
>> This will fail if there is nothing after a1 so you may prefer
>> >
>> > ..cells(rows.count,"a").end(xlup).row+1

>>
>>
>> --
>> Don Guillett
>> SalesAid Software
>> (E-Mail Removed)
>> "Benz" <(E-Mail Removed)> wrote in message
>> news:652C2B82-859B-4793-B2BA-(E-Mail Removed)...
>> > When I try that I get the error; "Application - defined or object -
>> > defined
>> > error"
>> >
>> > "Don Guillett" wrote:
>> >
>> >> This will fail if there is nothing after a1 so you may prefer
>> >>
>> >> ..cells(rows.count,"a").end(xlup).row+1
>> >>
>> >> Sub TESTINGTRANSFER()
>> >> Selection.EntireRow.Cut Destination:= _
>> >> Sheets("sheet18").Range("A1").End(xlDown).Offset(1)
>> >> End Sub
>> >>
>> >> --
>> >> Don Guillett
>> >> SalesAid Software
>> >> (E-Mail Removed)
>> >> "Benz" <(E-Mail Removed)> wrote in message
>> >> news:469DAE82-DB2E-4A15-9538-(E-Mail Removed)...
>> >> > Sorry,
>> >> >
>> >> > Code:
>> >> >
>> >> > Sub TESTINGTRANSFER()
>> >> > Selection.Copy
>> >> > Sheets("A").Select
>> >> > Selection.Select
>> >> > Sheets("B").Select.Range("A1").End(xlDown).Offset(1, 0).Paste
>> >> > Application.CutCopyMode = False
>> >> > Selection.Delete Shift:=xlUp
>> >> > End Sub
>> >> >
>> >> > Thanks Don.
>> >> >
>> >> > "Don Guillett" wrote:
>> >> >
>> >> >> Pretty easy but, as always, post YOUR coding efforts for comments
>> >> >>
>> >> >> --
>> >> >> Don Guillett
>> >> >> SalesAid Software
>> >> >> (E-Mail Removed)
>> >> >> "Benz" <(E-Mail Removed)> wrote in message
>> >> >> news:CBA70555-13F3-4B53-AE20-(E-Mail Removed)...
>> >> >> > Hello,
>> >> >> >
>> >> >> > I have what I would imagine to be a pretty simple question. I'm
>> >> >> > having
>> >> >> > trouble getting a macro to copy the selected row in sheet "A" and
>> >> >> > paste
>> >> >> > in
>> >> >> > the first available row in sheet "B" and then delete the content
>> >> >> > from
>> >> >> > the
>> >> >> > original row in Sheet "A". I can just almost get it but not
>> >> >> > quiet.
>> >> >> > Thank
>> >> >> > you to anyone that helps.
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?QmVueg==?=
Guest
Posts: n/a
 
      20th Nov 2006
I originaly tried what you said :

Sub TESTINGTRANSFER2()
Selection.EntireRow.Cut Destination:= _
Sheets("B").Cells(Rows.Count, "a").End(xlUp).Row + 1
End Sub

Then I received an error.
So I tried fussing with it and tried this:

Sub TESTINGTRANSFER()

Selection.EntireRow.Copy Destination:= _
Sheets("B").Range("A1").End(xlDown).Offset(1)
Selection.Delete Shift:=xlUp

End Sub

Im not the greatest at VBA but this is so confusing to me.

Thank you for your help, its probaly frustrating to you.





"Don Guillett" wrote:

> copy/paste your entire code here
>
> --
> Don Guillett
> SalesAid Software
> (E-Mail Removed)
> "Benz" <(E-Mail Removed)> wrote in message
> news:49942563-11DD-4BAF-98B8-(E-Mail Removed)...
> > When I tried that is when I receive the error.
> >
> > "Don Guillett" wrote:
> >
> >> This will fail if there is nothing after a1 so you may prefer
> >> >
> >> > ..cells(rows.count,"a").end(xlup).row+1
> >>
> >>
> >> --
> >> Don Guillett
> >> SalesAid Software
> >> (E-Mail Removed)
> >> "Benz" <(E-Mail Removed)> wrote in message
> >> news:652C2B82-859B-4793-B2BA-(E-Mail Removed)...
> >> > When I try that I get the error; "Application - defined or object -
> >> > defined
> >> > error"
> >> >
> >> > "Don Guillett" wrote:
> >> >
> >> >> This will fail if there is nothing after a1 so you may prefer
> >> >>
> >> >> ..cells(rows.count,"a").end(xlup).row+1
> >> >>
> >> >> Sub TESTINGTRANSFER()
> >> >> Selection.EntireRow.Cut Destination:= _
> >> >> Sheets("sheet18").Range("A1").End(xlDown).Offset(1)
> >> >> End Sub
> >> >>
> >> >> --
> >> >> Don Guillett
> >> >> SalesAid Software
> >> >> (E-Mail Removed)
> >> >> "Benz" <(E-Mail Removed)> wrote in message
> >> >> news:469DAE82-DB2E-4A15-9538-(E-Mail Removed)...
> >> >> > Sorry,
> >> >> >
> >> >> > Code:
> >> >> >
> >> >> > Sub TESTINGTRANSFER()
> >> >> > Selection.Copy
> >> >> > Sheets("A").Select
> >> >> > Selection.Select
> >> >> > Sheets("B").Select.Range("A1").End(xlDown).Offset(1, 0).Paste
> >> >> > Application.CutCopyMode = False
> >> >> > Selection.Delete Shift:=xlUp
> >> >> > End Sub
> >> >> >
> >> >> > Thanks Don.
> >> >> >
> >> >> > "Don Guillett" wrote:
> >> >> >
> >> >> >> Pretty easy but, as always, post YOUR coding efforts for comments
> >> >> >>
> >> >> >> --
> >> >> >> Don Guillett
> >> >> >> SalesAid Software
> >> >> >> (E-Mail Removed)
> >> >> >> "Benz" <(E-Mail Removed)> wrote in message
> >> >> >> news:CBA70555-13F3-4B53-AE20-(E-Mail Removed)...
> >> >> >> > Hello,
> >> >> >> >
> >> >> >> > I have what I would imagine to be a pretty simple question. I'm
> >> >> >> > having
> >> >> >> > trouble getting a macro to copy the selected row in sheet "A" and
> >> >> >> > paste
> >> >> >> > in
> >> >> >> > the first available row in sheet "B" and then delete the content
> >> >> >> > from
> >> >> >> > the
> >> >> >> > original row in Sheet "A". I can just almost get it but not
> >> >> >> > quiet.
> >> >> >> > Thank
> >> >> >> > you to anyone that helps.
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      20th Nov 2006
If you like send your workbook to my email below along with this email and
specific instructions on what your are trying to do.

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Benz" <(E-Mail Removed)> wrote in message
news:5ACB9FA3-5812-4D7A-8D41-(E-Mail Removed)...
>I originaly tried what you said :
>
> Sub TESTINGTRANSFER2()
> Selection.EntireRow.Cut Destination:= _
> Sheets("B").Cells(Rows.Count, "a").End(xlUp).Row + 1
> End Sub
>
> Then I received an error.
> So I tried fussing with it and tried this:
>
> Sub TESTINGTRANSFER()
>
> Selection.EntireRow.Copy Destination:= _
> Sheets("B").Range("A1").End(xlDown).Offset(1)
> Selection.Delete Shift:=xlUp
>
> End Sub
>
> Im not the greatest at VBA but this is so confusing to me.
>
> Thank you for your help, its probaly frustrating to you.
>
>
>
>
>
> "Don Guillett" wrote:
>
>> copy/paste your entire code here
>>
>> --
>> Don Guillett
>> SalesAid Software
>> (E-Mail Removed)
>> "Benz" <(E-Mail Removed)> wrote in message
>> news:49942563-11DD-4BAF-98B8-(E-Mail Removed)...
>> > When I tried that is when I receive the error.
>> >
>> > "Don Guillett" wrote:
>> >
>> >> This will fail if there is nothing after a1 so you may prefer
>> >> >
>> >> > ..cells(rows.count,"a").end(xlup).row+1
>> >>
>> >>
>> >> --
>> >> Don Guillett
>> >> SalesAid Software
>> >> (E-Mail Removed)
>> >> "Benz" <(E-Mail Removed)> wrote in message
>> >> news:652C2B82-859B-4793-B2BA-(E-Mail Removed)...
>> >> > When I try that I get the error; "Application - defined or object -
>> >> > defined
>> >> > error"
>> >> >
>> >> > "Don Guillett" wrote:
>> >> >
>> >> >> This will fail if there is nothing after a1 so you may prefer
>> >> >>
>> >> >> ..cells(rows.count,"a").end(xlup).row+1
>> >> >>
>> >> >> Sub TESTINGTRANSFER()
>> >> >> Selection.EntireRow.Cut Destination:= _
>> >> >> Sheets("sheet18").Range("A1").End(xlDown).Offset(1)
>> >> >> End Sub
>> >> >>
>> >> >> --
>> >> >> Don Guillett
>> >> >> SalesAid Software
>> >> >> (E-Mail Removed)
>> >> >> "Benz" <(E-Mail Removed)> wrote in message
>> >> >> news:469DAE82-DB2E-4A15-9538-(E-Mail Removed)...
>> >> >> > Sorry,
>> >> >> >
>> >> >> > Code:
>> >> >> >
>> >> >> > Sub TESTINGTRANSFER()
>> >> >> > Selection.Copy
>> >> >> > Sheets("A").Select
>> >> >> > Selection.Select
>> >> >> > Sheets("B").Select.Range("A1").End(xlDown).Offset(1, 0).Paste
>> >> >> > Application.CutCopyMode = False
>> >> >> > Selection.Delete Shift:=xlUp
>> >> >> > End Sub
>> >> >> >
>> >> >> > Thanks Don.
>> >> >> >
>> >> >> > "Don Guillett" wrote:
>> >> >> >
>> >> >> >> Pretty easy but, as always, post YOUR coding efforts for
>> >> >> >> comments
>> >> >> >>
>> >> >> >> --
>> >> >> >> Don Guillett
>> >> >> >> SalesAid Software
>> >> >> >> (E-Mail Removed)
>> >> >> >> "Benz" <(E-Mail Removed)> wrote in message
>> >> >> >> news:CBA70555-13F3-4B53-AE20-(E-Mail Removed)...
>> >> >> >> > Hello,
>> >> >> >> >
>> >> >> >> > I have what I would imagine to be a pretty simple question.
>> >> >> >> > I'm
>> >> >> >> > having
>> >> >> >> > trouble getting a macro to copy the selected row in sheet "A"
>> >> >> >> > and
>> >> >> >> > paste
>> >> >> >> > in
>> >> >> >> > the first available row in sheet "B" and then delete the
>> >> >> >> > content
>> >> >> >> > from
>> >> >> >> > the
>> >> >> >> > original row in Sheet "A". I can just almost get it but not
>> >> >> >> > quiet.
>> >> >> >> > Thank
>> >> >> >> > you to anyone that helps.
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy/Paste from One table to another in two seperate databases Ofelia Microsoft Access 1 29th Jun 2009 08:11 PM
Copy data into new line on seperate sheet? sarah Microsoft Excel Misc 1 12th May 2009 08:11 PM
Copy Non-Consecutive Rows and Paste in a Seperate Worksheet elf27 Microsoft Excel Programming 11 15th Mar 2009 02:15 AM
Copy and Paste seperate ranges in excel jeremy1404@gmail.com Microsoft Excel Programming 0 19th Jun 2007 08:43 PM
Copy/Paste categories of contacts into seperate folders? =?Utf-8?B?VGltIFJ5YW4=?= Microsoft Outlook Contacts 5 15th Aug 2006 07:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:22 AM.