Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default cut and paste with loop macro

I am very novice....so I have not found enough "simple" info to solve this
problem....
I need a macro that searches out the rows labelled "Archive" (in Column E)
(in the "Master" sheet), cuts and pastes the whole row to another sheet,
labelled "Archive". But the formula stops after one paste and only searches
out cells below the active row. It also does not clear the control check
boxes that I've got in (every second column) N through AB (8 total). I'm
trying to totally automate this workbook so a macro is preferable.

I do not want the empty rows deleted or it will mess up my control boxes, I
just re-sort them and the empty rows go to the bottom.
Thanks


Cells.Find(What:="Archive", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Cut
Sheets("Archive").Select
ActiveSheet.Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0).Select
ActiveSheet.Paste
Sheets("Master").Select

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default cut and paste with loop macro

hi
I think you have left out a WHOLE lot of code. per the code you have
posted.... the reason it only does it once is because you dont have a loop.
and per my experience... cut and paste in a loop will crash your macro due to
memory errors. better to use variables and avoid the clipboard alltogeather.
cut and paste ...once or twice is ok...but not in a loop perticularly is the
data has thousands of lines.
Post ALL of your code so that we can get a better picture of what is
happening. perticularly about the "check boxes" which the code you posted
does not address.

Regards
FSt1

"Nic" wrote:

I am very novice....so I have not found enough "simple" info to solve this
problem....
I need a macro that searches out the rows labelled "Archive" (in Column E)
(in the "Master" sheet), cuts and pastes the whole row to another sheet,
labelled "Archive". But the formula stops after one paste and only searches
out cells below the active row. It also does not clear the control check
boxes that I've got in (every second column) N through AB (8 total). I'm
trying to totally automate this workbook so a macro is preferable.

I do not want the empty rows deleted or it will mess up my control boxes, I
just re-sort them and the empty rows go to the bottom.
Thanks


Cells.Find(What:="Archive", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Cut
Sheets("Archive").Select
ActiveSheet.Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0).Select
ActiveSheet.Paste
Sheets("Master").Select

  #3   Report Post  
Posted to microsoft.public.excel.programming
Nic Nic is offline
external usenet poster
 
Posts: 25
Default cut and paste with loop macro

Hmm, well as a novice, that's about all I have so far, I didn't know it was
missing so much. I'm only going to have about 100 total lines max, because we
will be archiving so much regularly. It will probably only have about 5-8
archived at one time as well.
As for the checkboxes, I'm not sure what code there is, I've used the
control box to create it, and I've linked it to the cell underneath, so I
think I just need to figure out how to change the cells to FALSE to make it
clear the checkmark?
If this is too much work, could you direct me to a learning resource where I
can do more research to understand my errors?
Thanks for your response!!


"FSt1" wrote:

hi
I think you have left out a WHOLE lot of code. per the code you have
posted.... the reason it only does it once is because you dont have a loop.
and per my experience... cut and paste in a loop will crash your macro due to
memory errors. better to use variables and avoid the clipboard alltogeather.
cut and paste ...once or twice is ok...but not in a loop perticularly is the
data has thousands of lines.
Post ALL of your code so that we can get a better picture of what is
happening. perticularly about the "check boxes" which the code you posted
does not address.

Regards
FSt1

"Nic" wrote:

I am very novice....so I have not found enough "simple" info to solve this
problem....
I need a macro that searches out the rows labelled "Archive" (in Column E)
(in the "Master" sheet), cuts and pastes the whole row to another sheet,
labelled "Archive". But the formula stops after one paste and only searches
out cells below the active row. It also does not clear the control check
boxes that I've got in (every second column) N through AB (8 total). I'm
trying to totally automate this workbook so a macro is preferable.

I do not want the empty rows deleted or it will mess up my control boxes, I
just re-sort them and the empty rows go to the bottom.
Thanks


Cells.Find(What:="Archive", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Cut
Sheets("Archive").Select
ActiveSheet.Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0).Select
ActiveSheet.Paste
Sheets("Master").Select

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default cut and paste with loop macro

hi again
not too much work. the code you posted is simple enoght. just need some
"cleaning up". one queston.... is column E a solid block of data or are there
gaps(blank cells)?
The "check boxes" remain a problem.

regards
FSt1

"Nic" wrote:

Hmm, well as a novice, that's about all I have so far, I didn't know it was
missing so much. I'm only going to have about 100 total lines max, because we
will be archiving so much regularly. It will probably only have about 5-8
archived at one time as well.
As for the checkboxes, I'm not sure what code there is, I've used the
control box to create it, and I've linked it to the cell underneath, so I
think I just need to figure out how to change the cells to FALSE to make it
clear the checkmark?
If this is too much work, could you direct me to a learning resource where I
can do more research to understand my errors?
Thanks for your response!!


"FSt1" wrote:

hi
I think you have left out a WHOLE lot of code. per the code you have
posted.... the reason it only does it once is because you dont have a loop.
and per my experience... cut and paste in a loop will crash your macro due to
memory errors. better to use variables and avoid the clipboard alltogeather.
cut and paste ...once or twice is ok...but not in a loop perticularly is the
data has thousands of lines.
Post ALL of your code so that we can get a better picture of what is
happening. perticularly about the "check boxes" which the code you posted
does not address.

Regards
FSt1

"Nic" wrote:

I am very novice....so I have not found enough "simple" info to solve this
problem....
I need a macro that searches out the rows labelled "Archive" (in Column E)
(in the "Master" sheet), cuts and pastes the whole row to another sheet,
labelled "Archive". But the formula stops after one paste and only searches
out cells below the active row. It also does not clear the control check
boxes that I've got in (every second column) N through AB (8 total). I'm
trying to totally automate this workbook so a macro is preferable.

I do not want the empty rows deleted or it will mess up my control boxes, I
just re-sort them and the empty rows go to the bottom.
Thanks


Cells.Find(What:="Archive", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Cut
Sheets("Archive").Select
ActiveSheet.Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0).Select
ActiveSheet.Paste
Sheets("Master").Select

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default cut and paste with loop macro

hi again,
it's close to midnight here. I'm crashing. I will look for your post
tommorrow.
sorry.
regards
FSt1


"FSt1" wrote:

hi again
not too much work. the code you posted is simple enoght. just need some
"cleaning up". one queston.... is column E a solid block of data or are there
gaps(blank cells)?
The "check boxes" remain a problem.

regards
FSt1

"Nic" wrote:

Hmm, well as a novice, that's about all I have so far, I didn't know it was
missing so much. I'm only going to have about 100 total lines max, because we
will be archiving so much regularly. It will probably only have about 5-8
archived at one time as well.
As for the checkboxes, I'm not sure what code there is, I've used the
control box to create it, and I've linked it to the cell underneath, so I
think I just need to figure out how to change the cells to FALSE to make it
clear the checkmark?
If this is too much work, could you direct me to a learning resource where I
can do more research to understand my errors?
Thanks for your response!!


"FSt1" wrote:

hi
I think you have left out a WHOLE lot of code. per the code you have
posted.... the reason it only does it once is because you dont have a loop.
and per my experience... cut and paste in a loop will crash your macro due to
memory errors. better to use variables and avoid the clipboard alltogeather.
cut and paste ...once or twice is ok...but not in a loop perticularly is the
data has thousands of lines.
Post ALL of your code so that we can get a better picture of what is
happening. perticularly about the "check boxes" which the code you posted
does not address.

Regards
FSt1

"Nic" wrote:

I am very novice....so I have not found enough "simple" info to solve this
problem....
I need a macro that searches out the rows labelled "Archive" (in Column E)
(in the "Master" sheet), cuts and pastes the whole row to another sheet,
labelled "Archive". But the formula stops after one paste and only searches
out cells below the active row. It also does not clear the control check
boxes that I've got in (every second column) N through AB (8 total). I'm
trying to totally automate this workbook so a macro is preferable.

I do not want the empty rows deleted or it will mess up my control boxes, I
just re-sort them and the empty rows go to the bottom.
Thanks


Cells.Find(What:="Archive", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Cut
Sheets("Archive").Select
ActiveSheet.Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0).Select
ActiveSheet.Paste
Sheets("Master").Select

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and Paste Loop Marcu2 Excel Programming 0 February 14th 07 08:41 AM
Copy and Paste using a loop bestie via OfficeKB.com Excel Programming 0 August 3rd 06 08:57 AM
For next loop and paste special Help please mrdata[_20_] Excel Programming 7 April 14th 06 02:52 AM
Cut & Paste Loop Allan[_5_] Excel Programming 1 February 3rd 04 07:28 PM
copy and paste loop Dillonstar[_5_] Excel Programming 1 December 11th 03 04:22 PM


All times are GMT +1. The time now is 06:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"