Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Macro to copy & paste-special-values data to selected worksheets

I have a workbook containing worksheets called List-1, List-2, List-3,
List-4 and many other worksheet templates. I need a macro to perform the
following:

1. On any of the particular worksheet templates, copy the data on the
entire row for all rows within the range A1:H50 only if the value for that
row in column H is greater than 0, and then paste special values the data
on the worksheet called List-1 starting at cell A1. In other words, for any
row within the range that has a value in column H that is greater than 0, the
entire row of data in column A-H will be copied and pasted (paste special
values) on List-1.

2. Perform the same routine as step 1 except select the data in cells
A51:H100 and paste-special-values on List-2 starting at cell A1.

3. Perform the same routine as step 1 except select the data in cells
A101:H150 and paste-special-values on List-3 starting at cell A1.

4. Perform the same routine as step 1 except select the data in cells
A151:H200 and paste-special-values on List-4 starting at cell A1.

5. Return back to the original worksheet template, select cell A1, and
escape to eliminate any evidence of the range selection (dashed borders) that
was used to copy data in step 1-4.

Ill use a button to activate the macro on each individual worksheet
template. When the user activates the macro on the first template worksheet,
the data will be copied, and pasted (paste special values) to each of the
lists as noted above. When the user activates the macro on any of the
subsequent templates, the data will copied and pasted (paste special values)
on each of the lists starting at the next empty row in column A. In other
words, I want the user to be able to continue to add data to List-1,
List-2, List-3 and List-4 from any of the template worksheets.

I dont have much experience with vba therefore, any help for a novice to
apply this would be greatly appreciated.

Thanks in advance,

Tom

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default Macro to copy & paste-special-values data to selected worksheets

On May 5, 7:31*am, tomhelle
wrote:
I have a workbook containing worksheets called List-1, List-2, List-3,
List-4 and many other worksheet templates. I need a macro to perform the
following:

1. *On any of the particular worksheet templates, copy the data on the
entire row for all rows within the range A1:H50 only if the value for that
row in column H is greater than 0, and then paste special values the data
on the worksheet called List-1 starting at cell A1. In other words, for any
row within the range that has a value in column H that is greater than 0, the
entire row of data in column A-H will be copied and pasted (paste special
values) on List-1.

2. *Perform the same routine as step 1 except select the data in cells
A51:H100 and paste-special-values on List-2 starting at cell A1.

3. *Perform the same routine as step 1 except select the data in cells
A101:H150 and paste-special-values on List-3 starting at cell A1.

4. *Perform the same routine as step 1 except select the data in cells
A151:H200 and paste-special-values on List-4 starting at cell A1.

5. *Return back to the original worksheet template, select cell A1, and
escape to eliminate any evidence of the range selection (dashed borders) that
was used to copy data in step 1-4.

Ill use a button to activate the macro on each individual worksheet
template. When the user activates the macro on the first template worksheet,
the data will be copied, and pasted (paste special values) to each of the
lists as noted above. When the user activates the macro on any of the
subsequent templates, the data will copied and pasted (paste special values)
on each of the lists starting at the next empty row in column A. In other
words, I want the user to be able to continue to add data to List-1,
List-2, List-3 and List-4 from any of the template worksheets.

I dont have much experience with vba therefore, any help for a novice to
apply this would be greatly appreciated.

Thanks in advance,

Tom


Air code:

for i=1 to 4
set rng=range("H" & (i-1)*50+1 & ":H" & (i*50))
for each c in rng
if c0 then
c.entirerow.copy
worksheets("List-" & i).cells(rows.count,
1).end(xlup).offset(1).pastespecial
end if
next c
next i

Application.CutCopyMode = False
Range("A1").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
Changing Of Values After A Copy And Paste Special: Why ? Bob[_19_] Excel Discussion (Misc queries) 1 March 15th 10 11:44 PM
Copy Values only without Paste Special karl Excel Discussion (Misc queries) 6 December 22nd 08 02:03 AM
Copy range in macro using paste special values Jeff Excel Discussion (Misc queries) 2 August 20th 07 08:12 PM
Copy / Paste Special / Values for a whole spreadsheet ? Colin2 Excel Discussion (Misc queries) 4 May 23rd 06 05:11 PM
Copy Paste Special Macro Bud Hughes Excel Discussion (Misc queries) 2 August 31st 05 02:00 AM


All times are GMT +1. The time now is 12:01 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"