Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try the below. The destination is kept as 1st sheet Range A1. Change to suit.
Source would be the active sheet Sub Macro() Dim wb As Workbook, ws As Worksheet Set ws = ActiveSheet Set wb = Workbooks.Add ws.Range("Q1:R20").Copy wb.Sheets(1).Range("A1") End Sub -- Jacob "Elton Law" wrote: Dear expert, Wanna copy and paste value of range Q1:R20 in sheet1 to a new workbook. Is that difficult? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jacob,
It works 50% ... But it displays #REF! ... Can you teach me how to paste values only rather than formulas? Thanks Elton "Jacob Skaria" wrote: Try the below. The destination is kept as 1st sheet Range A1. Change to suit. Source would be the active sheet Sub Macro() Dim wb As Workbook, ws As Worksheet Set ws = ActiveSheet Set wb = Workbooks.Add ws.Range("Q1:R20").Copy wb.Sheets(1).Range("A1") End Sub -- Jacob "Elton Law" wrote: Dear expert, Wanna copy and paste value of range Q1:R20 in sheet1 to a new workbook. Is that difficult? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK. Try the below.
Sub Macro() Dim wb As Workbook, ws As Worksheet Set ws = ActiveSheet Set wb = Workbooks.Add ws.Range("Q1:R20").Copy wb.Sheets(1).Range("A1").PasteSpecial xlPasteValues Application.CutCopyMode = False End Sub Try recording a macro and modify to suit. -- Jacob "Elton Law" wrote: Hi Jacob, It works 50% ... But it displays #REF! ... Can you teach me how to paste values only rather than formulas? Thanks Elton "Jacob Skaria" wrote: Try the below. The destination is kept as 1st sheet Range A1. Change to suit. Source would be the active sheet Sub Macro() Dim wb As Workbook, ws As Worksheet Set ws = ActiveSheet Set wb = Workbooks.Add ws.Range("Q1:R20").Copy wb.Sheets(1).Range("A1") End Sub -- Jacob "Elton Law" wrote: Dear expert, Wanna copy and paste value of range Q1:R20 in sheet1 to a new workbook. Is that difficult? Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Work now work now .........
Thanks so much "Jacob Skaria" wrote: OK. Try the below. Sub Macro() Dim wb As Workbook, ws As Worksheet Set ws = ActiveSheet Set wb = Workbooks.Add ws.Range("Q1:R20").Copy wb.Sheets(1).Range("A1").PasteSpecial xlPasteValues Application.CutCopyMode = False End Sub Try recording a macro and modify to suit. -- Jacob "Elton Law" wrote: Hi Jacob, It works 50% ... But it displays #REF! ... Can you teach me how to paste values only rather than formulas? Thanks Elton "Jacob Skaria" wrote: Try the below. The destination is kept as 1st sheet Range A1. Change to suit. Source would be the active sheet Sub Macro() Dim wb As Workbook, ws As Worksheet Set ws = ActiveSheet Set wb = Workbooks.Add ws.Range("Q1:R20").Copy wb.Sheets(1).Range("A1") End Sub -- Jacob "Elton Law" wrote: Dear expert, Wanna copy and paste value of range Q1:R20 in sheet1 to a new workbook. Is that difficult? Thanks |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jocab,
Can I ask one more question? Can you tell me how to retain the format please? I don't want to date to show up as 40180 .... wanna keep as 1 Dec 2009. Thanks "Elton Law" wrote: Work now work now ......... Thanks so much "Jacob Skaria" wrote: OK. Try the below. Sub Macro() Dim wb As Workbook, ws As Worksheet Set ws = ActiveSheet Set wb = Workbooks.Add ws.Range("Q1:R20").Copy wb.Sheets(1).Range("A1").PasteSpecial xlPasteValues Application.CutCopyMode = False End Sub Try recording a macro and modify to suit. -- Jacob "Elton Law" wrote: Hi Jacob, It works 50% ... But it displays #REF! ... Can you teach me how to paste values only rather than formulas? Thanks Elton "Jacob Skaria" wrote: Try the below. The destination is kept as 1st sheet Range A1. Change to suit. Source would be the active sheet Sub Macro() Dim wb As Workbook, ws As Worksheet Set ws = ActiveSheet Set wb = Workbooks.Add ws.Range("Q1:R20").Copy wb.Sheets(1).Range("A1") End Sub -- Jacob "Elton Law" wrote: Dear expert, Wanna copy and paste value of range Q1:R20 in sheet1 to a new workbook. Is that difficult? Thanks |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can repeat the pastespecial...with different paste types
Sub Macro() Dim wb As Workbook, ws As Worksheet Set ws = ActiveSheet Set wb = Workbooks.Add ws.Range("Q1:R20").Copy wb.Sheets(1).Range("A1").PasteSpecial xlPasteValues wb.Sheets(1).Range("A1").PasteSpecial xlPasteFormats Application.CutCopyMode = False End Sub -- Jacob "Elton Law" wrote: Hi Jocab, Can I ask one more question? Can you tell me how to retain the format please? I don't want to date to show up as 40180 .... wanna keep as 1 Dec 2009. Thanks "Elton Law" wrote: Work now work now ......... Thanks so much "Jacob Skaria" wrote: OK. Try the below. Sub Macro() Dim wb As Workbook, ws As Worksheet Set ws = ActiveSheet Set wb = Workbooks.Add ws.Range("Q1:R20").Copy wb.Sheets(1).Range("A1").PasteSpecial xlPasteValues Application.CutCopyMode = False End Sub Try recording a macro and modify to suit. -- Jacob "Elton Law" wrote: Hi Jacob, It works 50% ... But it displays #REF! ... Can you teach me how to paste values only rather than formulas? Thanks Elton "Jacob Skaria" wrote: Try the below. The destination is kept as 1st sheet Range A1. Change to suit. Source would be the active sheet Sub Macro() Dim wb As Workbook, ws As Worksheet Set ws = ActiveSheet Set wb = Workbooks.Add ws.Range("Q1:R20").Copy wb.Sheets(1).Range("A1") End Sub -- Jacob "Elton Law" wrote: Dear expert, Wanna copy and paste value of range Q1:R20 in sheet1 to a new workbook. Is that difficult? Thanks |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks
All solve. Thanks Elton "Jacob Skaria" wrote: You can repeat the pastespecial...with different paste types Sub Macro() Dim wb As Workbook, ws As Worksheet Set ws = ActiveSheet Set wb = Workbooks.Add ws.Range("Q1:R20").Copy wb.Sheets(1).Range("A1").PasteSpecial xlPasteValues wb.Sheets(1).Range("A1").PasteSpecial xlPasteFormats Application.CutCopyMode = False End Sub -- Jacob "Elton Law" wrote: Hi Jocab, Can I ask one more question? Can you tell me how to retain the format please? I don't want to date to show up as 40180 .... wanna keep as 1 Dec 2009. Thanks "Elton Law" wrote: Work now work now ......... Thanks so much "Jacob Skaria" wrote: OK. Try the below. Sub Macro() Dim wb As Workbook, ws As Worksheet Set ws = ActiveSheet Set wb = Workbooks.Add ws.Range("Q1:R20").Copy wb.Sheets(1).Range("A1").PasteSpecial xlPasteValues Application.CutCopyMode = False End Sub Try recording a macro and modify to suit. -- Jacob "Elton Law" wrote: Hi Jacob, It works 50% ... But it displays #REF! ... Can you teach me how to paste values only rather than formulas? Thanks Elton "Jacob Skaria" wrote: Try the below. The destination is kept as 1st sheet Range A1. Change to suit. Source would be the active sheet Sub Macro() Dim wb As Workbook, ws As Worksheet Set ws = ActiveSheet Set wb = Workbooks.Add ws.Range("Q1:R20").Copy wb.Sheets(1).Range("A1") End Sub -- Jacob "Elton Law" wrote: Dear expert, Wanna copy and paste value of range Q1:R20 in sheet1 to a new workbook. Is that difficult? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy & Paste from One Workbook to a Macroed Template Workbook | Excel Programming | |||
Selecting data from 1 workbook to copy and paste to a 2nd workbook | Excel Programming | |||
I cannot paste from one workbook to another. Copy works, paste do. | Excel Discussion (Misc queries) | |||
Need a macro to copy a range in one workbook and paste into another workbook | Excel Programming | |||
Copy a range of cells in an unopened workbook and paste it to the current workbook | Excel Programming |