Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello,
I am trying to consolidate a number of worksheets into one "combined" worksheet. I've been able to get the following code to work but I want to modify it to paste values only. Can I have your thoughts on how this might be done? Thanks: Sub Combine() Dim J As Integer Dim k As Integer On Error Resume Next Sheets(1).Select Worksheets.Add ' add a sheet in first place Sheets(1).Name = "Combined" ' work through sheets For J = 10 To Sheets.Count ' from sheet 2 to last sheet Sheets(J).Activate ' make the sheet active Range("A1:A1").Select For k = 1 To 201 Selection.Copy Destination:=Sheets(1).Rows(k + 201 * (J - 10)).Columns(1) Next k Sheets(J).Activate Range("a10:d210").Select Selection.Copy Destination:=Sheets(1).Rows((J - 10) * 201 + 1).Columns(2) Next J End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro for copy and paste values | Excel Discussion (Misc queries) | |||
Copy / Paste Special / Values for a whole spreadsheet ? | Excel Discussion (Misc queries) | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) | |||
Copy and paste special - values into new excel file | Excel Discussion (Misc queries) | |||
copy-paste as Values automatically | Excel Worksheet Functions |