LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default copy selected rows to new sheet

My source_sheet contains data that is to be filtered with the accepted row
being copied to target_sheet. Here is a fragment that shows the goal in
pseudo code formatting. Where I have a hard number, code somewhere else has
found that number and provided it.

source_sheet and target_sheet are both Worksheet variables

first_row = 6 ' begin copying with this row
last_row = 134 ' stop copying at this row
target_row = 2 'put first row in row 2 of the target sheet
first_column = 1 ' I have this number if I need it
last_column = 18 ' I have this number if I need it

for source_row = first_row to last_row
If some_condition then
source_sheet.cells( all of row source_row).copy
target_sheet.cels( all of target_row ).paste
target_row = target_row + 1
end if
next source_row

I am not very good at digging through complex Excel syntax so I ask that
responses be in a simple format so I can understand. I need two statements
that do the following:
1) copy all of row number source_row from the source sheet,
2) paste that copied row into the target_sheet in row specified by
target_row

I want to be certain that the question is clear, but this is already too
long. Let me know if clarifications are in order.

Thanks,
Bryan


 
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
copy selected rows to second worksheet (NOT Cut + Paste) gyrra New Users to Excel 2 June 4th 10 09:05 PM
Copy a selected number of rows Eric S. Excel Discussion (Misc queries) 4 June 25th 07 08:23 AM
Copying selected rows to another sheet tacarme Excel Worksheet Functions 3 June 25th 05 11:46 AM
printing only selected rows in a sheet Wizard Excel Discussion (Misc queries) 0 May 11th 05 06:46 PM
Macro to copy and past selected rows only... Jules[_4_] Excel Programming 1 April 14th 04 02:31 PM


All times are GMT +1. The time now is 01:14 PM.

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"