PC Review


Reply
Thread Tools Rate Thread

copy rows from one worksheet to another using macros

 
 
karla
Guest
Posts: n/a
 
      27th Feb 2008
I have a report (sheet1) where columns a, b, c ,d have sales info, and column
e has the code of the salesmen like 2 for CA, 3 for AZ. what i need is a
macro that copy the entire row for the CA sales to a new worksheet (sheet2).
but also need that if for some reason we have to delete a row for the CA
salesperson (sheet1) will be deleted on sheet2.
Can somebody help me?
 
Reply With Quote
 
 
 
 
Otto Moehrbach
Guest
Posts: n/a
 
      27th Feb 2008
Karla
Are the rows for ALL the salesmen copied to the same sheet (sheet2 in
your post)? If not, how are the sheets identified as applying to one
salesman in particular?
Assuming that the destination sheet has more that one row with CA in it, and
you want to delete one row in sheet1 that has CA in it, how can the
corresponding row in sheet2 be identified as the one to delete?
One way, after you provide the info requested, would be to have 2 buttons at
the top of the sheet1, one labeled "Update" maybe, and the other "Delete".
The assigned macros would then operate on the active row of sheet1. HTH
Otto
"karla" <(E-Mail Removed)> wrote in message
news25C32BA-9B44-4003-88AA-(E-Mail Removed)...
>I have a report (sheet1) where columns a, b, c ,d have sales info, and
>column
> e has the code of the salesmen like 2 for CA, 3 for AZ. what i need is a
> macro that copy the entire row for the CA sales to a new worksheet
> (sheet2).
> but also need that if for some reason we have to delete a row for the CA
> salesperson (sheet1) will be deleted on sheet2.
> Can somebody help me?



 
Reply With Quote
 
karla
Guest
Posts: n/a
 
      27th Feb 2008
Hi Otto.
I just need the ones for CA be copied to sheet2.
Now since I'm going to be adding new entry sales every day, the updated
buttom i guess will be perfect. It doesn't matter if i have two buttoms!

"Otto Moehrbach" wrote:

> Karla
> Are the rows for ALL the salesmen copied to the same sheet (sheet2 in
> your post)? If not, how are the sheets identified as applying to one
> salesman in particular?
> Assuming that the destination sheet has more that one row with CA in it, and
> you want to delete one row in sheet1 that has CA in it, how can the
> corresponding row in sheet2 be identified as the one to delete?
> One way, after you provide the info requested, would be to have 2 buttons at
> the top of the sheet1, one labeled "Update" maybe, and the other "Delete".
> The assigned macros would then operate on the active row of sheet1. HTH
> Otto
> "karla" <(E-Mail Removed)> wrote in message
> news25C32BA-9B44-4003-88AA-(E-Mail Removed)...
> >I have a report (sheet1) where columns a, b, c ,d have sales info, and
> >column
> > e has the code of the salesmen like 2 for CA, 3 for AZ. what i need is a
> > macro that copy the entire row for the CA sales to a new worksheet
> > (sheet2).
> > but also need that if for some reason we have to delete a row for the CA
> > salesperson (sheet1) will be deleted on sheet2.
> > Can somebody help me?

>
>
>

 
Reply With Quote
 
Otto Moehrbach
Guest
Posts: n/a
 
      27th Feb 2008
Karla
You didn't answer my question about what you do when you want to delete
an entry in sheet1. You said that you want the same row in sheet2 deleted.
If you were doing what you want manually, how would you determine which row
in sheet2 you want to also delete? Otto
"karla" <(E-Mail Removed)> wrote in message
news:11ED25ED-3D00-4CA2-9FBC-(E-Mail Removed)...
> Hi Otto.
> I just need the ones for CA be copied to sheet2.
> Now since I'm going to be adding new entry sales every day, the updated
> buttom i guess will be perfect. It doesn't matter if i have two buttoms!
>
> "Otto Moehrbach" wrote:
>
>> Karla
>> Are the rows for ALL the salesmen copied to the same sheet (sheet2 in
>> your post)? If not, how are the sheets identified as applying to one
>> salesman in particular?
>> Assuming that the destination sheet has more that one row with CA in it,
>> and
>> you want to delete one row in sheet1 that has CA in it, how can the
>> corresponding row in sheet2 be identified as the one to delete?
>> One way, after you provide the info requested, would be to have 2 buttons
>> at
>> the top of the sheet1, one labeled "Update" maybe, and the other
>> "Delete".
>> The assigned macros would then operate on the active row of sheet1. HTH
>> Otto
>> "karla" <(E-Mail Removed)> wrote in message
>> news25C32BA-9B44-4003-88AA-(E-Mail Removed)...
>> >I have a report (sheet1) where columns a, b, c ,d have sales info, and
>> >column
>> > e has the code of the salesmen like 2 for CA, 3 for AZ. what i need is
>> > a
>> > macro that copy the entire row for the CA sales to a new worksheet
>> > (sheet2).
>> > but also need that if for some reason we have to delete a row for the
>> > CA
>> > salesperson (sheet1) will be deleted on sheet2.
>> > Can somebody help me?

>>
>>
>>



 
Reply With Quote
 
karla
Guest
Posts: n/a
 
      28th Feb 2008
Otto:
i'm sorry here is what i need:
sometimes the customers call us saying that they want to cancel the order.
so i have to delete that particular sales entry in sheet1. becuase that
particular sale already existis in sheet2, i want that be deleted in sheet2
too once i deleted in sheet1.
That is why i need a macro that copy the sales from CA to sheet2 and can
updated the sales; because i won't know how many sales i'll be deleting.

thank you very much for your time.. i really appreciate it!

"Otto Moehrbach" wrote:

> Karla
> You didn't answer my question about what you do when you want to delete
> an entry in sheet1. You said that you want the same row in sheet2 deleted.
> If you were doing what you want manually, how would you determine which row
> in sheet2 you want to also delete? Otto
> "karla" <(E-Mail Removed)> wrote in message
> news:11ED25ED-3D00-4CA2-9FBC-(E-Mail Removed)...
> > Hi Otto.
> > I just need the ones for CA be copied to sheet2.
> > Now since I'm going to be adding new entry sales every day, the updated
> > buttom i guess will be perfect. It doesn't matter if i have two buttoms!
> >
> > "Otto Moehrbach" wrote:
> >
> >> Karla
> >> Are the rows for ALL the salesmen copied to the same sheet (sheet2 in
> >> your post)? If not, how are the sheets identified as applying to one
> >> salesman in particular?
> >> Assuming that the destination sheet has more that one row with CA in it,
> >> and
> >> you want to delete one row in sheet1 that has CA in it, how can the
> >> corresponding row in sheet2 be identified as the one to delete?
> >> One way, after you provide the info requested, would be to have 2 buttons
> >> at
> >> the top of the sheet1, one labeled "Update" maybe, and the other
> >> "Delete".
> >> The assigned macros would then operate on the active row of sheet1. HTH
> >> Otto
> >> "karla" <(E-Mail Removed)> wrote in message
> >> news25C32BA-9B44-4003-88AA-(E-Mail Removed)...
> >> >I have a report (sheet1) where columns a, b, c ,d have sales info, and
> >> >column
> >> > e has the code of the salesmen like 2 for CA, 3 for AZ. what i need is
> >> > a
> >> > macro that copy the entire row for the CA sales to a new worksheet
> >> > (sheet2).
> >> > but also need that if for some reason we have to delete a row for the
> >> > CA
> >> > salesperson (sheet1) will be deleted on sheet2.
> >> > Can somebody help me?
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Otto Moehrbach
Guest
Posts: n/a
 
      28th Feb 2008
Karla
We're on a merry-go-round.
Say you make an entry in sheet1 and hit the Update button. That copies that
row to sheet2. Later, you go to sheet1 and put your cursor anywhere in the
row you want to delete and hit the Delete button. The code deletes that row
and then goes to sheet2 and looks for the row to delete in that sheet. I
assume sheet2 will have more than 1 entry with CA. Perhaps that's not a
good assumption.
The question: How would you find the right row to delete in sheet2 if you
were doing this manually? I think the answer to this is very simple to you
but, not knowing your business, it's not very simple to me. Otto
"karla" <(E-Mail Removed)> wrote in message
news:856ACFAE-F82D-4395-8142-(E-Mail Removed)...
> Otto:
> i'm sorry here is what i need:
> sometimes the customers call us saying that they want to cancel the order.
> so i have to delete that particular sales entry in sheet1. becuase that
> particular sale already existis in sheet2, i want that be deleted in
> sheet2
> too once i deleted in sheet1.
> That is why i need a macro that copy the sales from CA to sheet2 and can
> updated the sales; because i won't know how many sales i'll be deleting.
>
> thank you very much for your time.. i really appreciate it!
>
> "Otto Moehrbach" wrote:
>
>> Karla
>> You didn't answer my question about what you do when you want to
>> delete
>> an entry in sheet1. You said that you want the same row in sheet2
>> deleted.
>> If you were doing what you want manually, how would you determine which
>> row
>> in sheet2 you want to also delete? Otto
>> "karla" <(E-Mail Removed)> wrote in message
>> news:11ED25ED-3D00-4CA2-9FBC-(E-Mail Removed)...
>> > Hi Otto.
>> > I just need the ones for CA be copied to sheet2.
>> > Now since I'm going to be adding new entry sales every day, the updated
>> > buttom i guess will be perfect. It doesn't matter if i have two
>> > buttoms!
>> >
>> > "Otto Moehrbach" wrote:
>> >
>> >> Karla
>> >> Are the rows for ALL the salesmen copied to the same sheet (sheet2
>> >> in
>> >> your post)? If not, how are the sheets identified as applying to one
>> >> salesman in particular?
>> >> Assuming that the destination sheet has more that one row with CA in
>> >> it,
>> >> and
>> >> you want to delete one row in sheet1 that has CA in it, how can the
>> >> corresponding row in sheet2 be identified as the one to delete?
>> >> One way, after you provide the info requested, would be to have 2
>> >> buttons
>> >> at
>> >> the top of the sheet1, one labeled "Update" maybe, and the other
>> >> "Delete".
>> >> The assigned macros would then operate on the active row of sheet1.
>> >> HTH
>> >> Otto
>> >> "karla" <(E-Mail Removed)> wrote in message
>> >> news25C32BA-9B44-4003-88AA-(E-Mail Removed)...
>> >> >I have a report (sheet1) where columns a, b, c ,d have sales info,
>> >> >and
>> >> >column
>> >> > e has the code of the salesmen like 2 for CA, 3 for AZ. what i need
>> >> > is
>> >> > a
>> >> > macro that copy the entire row for the CA sales to a new worksheet
>> >> > (sheet2).
>> >> > but also need that if for some reason we have to delete a row for
>> >> > the
>> >> > CA
>> >> > salesperson (sheet1) will be deleted on sheet2.
>> >> > Can somebody help me?
>> >>
>> >>
>> >>

>>
>>
>>



 
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 rows from one worksheet automatically, ignore rows that are b Kris Microsoft Excel Worksheet Functions 2 10th Oct 2008 09:28 PM
Copy Rows From Worksheet Into Another Worksheet Same Workbook =?Utf-8?B?Sm9lIEsu?= Microsoft Excel Programming 6 7th Oct 2007 09:44 PM
Find all rows of a color and copy those rows to a new worksheet =?Utf-8?B?aHNoYXloMHJu?= Microsoft Excel Programming 3 26th May 2006 08:34 PM
Copy Worksheet Not the Macros micheldevon@gmail.com Microsoft Excel Programming 2 9th Feb 2006 10:49 PM
Using macros to cut & paste rows to a new worksheet Richard_S Microsoft Excel Programming 1 15th Jul 2004 02:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:47 PM.