Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA .copy destination
I have this code: Worksheets("Sheet1").Range("A1:D4").Copy _ destination:=Worksheets("Sheet2").Range("E5") doing it this way copies the formatting as well, is there a way to copy just the value over without the cell format? Thanks in advance -- jerredjohnson ------------------------------------------------------------------------ jerredjohnson's Profile: http://www.excelforum.com/member.php...o&userid=32236 View this thread: http://www.excelforum.com/showthread...hreadid=562642 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA .copy destination
One way...
dim RngToCopy as range Dim DestCell as range set rngtocopy = worksheets("Sheet1".range("a1:d4") set destcell = worksheets("sheet2").range("E5") destcell.resize(rngtocopy.rows.count,rngtocopy.col umns.count).value _ = rngtocopy.value ======== Another way is to just copy|paste special|values dim RngToCopy as range Dim DestCell as range set rngtocopy = worksheets("Sheet1".range("a1:d4") set destcell = worksheets("sheet2").range("E5") rngtcopy.copy destcell.pastespecial paste:=xlpastevalues jerredjohnson wrote: I have this code: Worksheets("Sheet1").Range("A1:D4").Copy _ destination:=Worksheets("Sheet2").Range("E5") doing it this way copies the formatting as well, is there a way to copy just the value over without the cell format? Thanks in advance -- jerredjohnson ------------------------------------------------------------------------ jerredjohnson's Profile: http://www.excelforum.com/member.php...o&userid=32236 View this thread: http://www.excelforum.com/showthread...hreadid=562642 -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA .copy destination
to copy just the values you don't need to copy. try
Worksheets("Sheet2").Range("E5:h9").value= _ Worksheets("Sheet1").Range("A1:D4").value ranges must be the same size -- Don Guillett SalesAid Software "jerredjohnson" wrote in message news:jerredjohnson.2b5uch_1153258508.578@excelforu m-nospam.com... I have this code: Worksheets("Sheet1").Range("A1:D4").Copy _ destination:=Worksheets("Sheet2").Range("E5") doing it this way copies the formatting as well, is there a way to copy just the value over without the cell format? Thanks in advance -- jerredjohnson ------------------------------------------------------------------------ jerredjohnson's Profile: http://www.excelforum.com/member.php...o&userid=32236 View this thread: http://www.excelforum.com/showthread...hreadid=562642 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to set a default paste option of "Match Destination Format" | Excel Discussion (Misc queries) | |||
sort source workbook data, maintain formulas in destination workb. | Excel Worksheet Functions | |||
How do I autofill combo boxes with their destination cell? | Excel Worksheet Functions | |||
XL2003 Destination and Source Open but not updating | Excel Discussion (Misc queries) | |||
Hyperlinks - identifying source in destination sheet | Excel Discussion (Misc queries) |