Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Copying a range

This works
Sheets("Pages").Cells(iCPaRow, 1) =
Sheets("Specs").Cells(iCSpRow, 1)
Sheets("Pages").Cells(iCPaRow, 2) =
Sheets("Specs").Cells(iCSpRow, 2)
Sheets("Pages").Cells(iCPaRow, 3) =
Sheets("Specs").Cells(iCSpRow, 3)
Sheets("Pages").Cells(iCPaRow, 4) =
Sheets("Specs").Cells(iCSpRow, 4)

This does not work
Sheets("Pages").Range(Cells(iCPaRow, 1), Cells(iCPaRow, 4)) = _
Sheets("Specs").Range(Cells(iCSpRow, 1), Cells(iCSpRow, 4))

This works but copies formatting as well as values - I only want values
Sheets("Specs").Range(Cells(iCSpRow, 1), Cells(iCSpRow, 4)).Copy
_
Destination:=Worksheets("Pages").Cells(iCPaRow, 1)

This does not work
Sheets("Specs").Range(Cells(iCSpRow, 1), Cells(iCSpRow,
4)).Copy.Values _
Destination:=Worksheets("Pages").Cells(iCPaRow, 1)


Please help.


Francis Hookham
XL 2002


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Copying a range

Try pastespecial. below there are two seperate instruction. the first is
the Copy and the ssecond is the paste.

Sheets("Specs").Range(Cells(iCSpRow, 1), Cells(iCSpRow, 4)).Copy
Worksheets("Pages").Cells(iCPaRow, 1).PasteSpecial _
Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False


"Francis Hookham" wrote:

This works
Sheets("Pages").Cells(iCPaRow, 1) =
Sheets("Specs").Cells(iCSpRow, 1)
Sheets("Pages").Cells(iCPaRow, 2) =
Sheets("Specs").Cells(iCSpRow, 2)
Sheets("Pages").Cells(iCPaRow, 3) =
Sheets("Specs").Cells(iCSpRow, 3)
Sheets("Pages").Cells(iCPaRow, 4) =
Sheets("Specs").Cells(iCSpRow, 4)

This does not work
Sheets("Pages").Range(Cells(iCPaRow, 1), Cells(iCPaRow, 4)) = _
Sheets("Specs").Range(Cells(iCSpRow, 1), Cells(iCSpRow, 4))

This works but copies formatting as well as values - I only want values
Sheets("Specs").Range(Cells(iCSpRow, 1), Cells(iCSpRow, 4)).Copy
_
Destination:=Worksheets("Pages").Cells(iCPaRow, 1)

This does not work
Sheets("Specs").Range(Cells(iCSpRow, 1), Cells(iCSpRow,
4)).Copy.Values _
Destination:=Worksheets("Pages").Cells(iCPaRow, 1)


Please help.


Francis Hookham
XL 2002



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Copying a range

Thanks a million Joel

Francis

"Joel" wrote in message
...
Try pastespecial. below there are two seperate instruction. the first is
the Copy and the ssecond is the paste.

Sheets("Specs").Range(Cells(iCSpRow, 1), Cells(iCSpRow, 4)).Copy
Worksheets("Pages").Cells(iCPaRow, 1).PasteSpecial _
Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False


"Francis Hookham" wrote:

This works
Sheets("Pages").Cells(iCPaRow, 1) =
Sheets("Specs").Cells(iCSpRow, 1)
Sheets("Pages").Cells(iCPaRow, 2) =
Sheets("Specs").Cells(iCSpRow, 2)
Sheets("Pages").Cells(iCPaRow, 3) =
Sheets("Specs").Cells(iCSpRow, 3)
Sheets("Pages").Cells(iCPaRow, 4) =
Sheets("Specs").Cells(iCSpRow, 4)

This does not work
Sheets("Pages").Range(Cells(iCPaRow, 1), Cells(iCPaRow, 4)) =
_
Sheets("Specs").Range(Cells(iCSpRow, 1), Cells(iCSpRow,
4))

This works but copies formatting as well as values - I only want values
Sheets("Specs").Range(Cells(iCSpRow, 1), Cells(iCSpRow,
4)).Copy
_
Destination:=Worksheets("Pages").Cells(iCPaRow, 1)

This does not work
Sheets("Specs").Range(Cells(iCSpRow, 1), Cells(iCSpRow,
4)).Copy.Values _
Destination:=Worksheets("Pages").Cells(iCPaRow, 1)


Please help.


Francis Hookham
XL 2002





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
Copying Range Based On Certain Criteria? Possible looping through the Range Big H Excel Programming 1 October 27th 06 03:32 AM
copying dynamic range based on cell outside of range xcelelder Excel Programming 3 September 29th 05 05:08 PM
Need VBA Help in Copying Range WayneK[_2_] Excel Programming 5 June 6th 05 07:31 PM
Searching a range and copying values into a new range.... **Please help** :( Lancia Excel Programming 1 September 29th 04 01:08 PM
Copying a range to the row below Trevor[_3_] Excel Programming 2 October 20th 03 07:51 PM


All times are GMT +1. The time now is 10:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"