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

RowNum = ActiveCell.Row
Cells(RowNum, 29).Copy Destination:=Cells(28, 5)
Cells(RowNum + 1, 29).Copy Destination:=Cells(30, 5)
Cells(RowNum + 2, 29).Copy Destination:=Cells(32, 5)

seems to copy everything.

can this be modified to copy only values only?

Francis Hookham


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Copy values only

Replace your first line with:
Cells(RowNum, 29).Copy
Cells(28, 5).PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Replace the other two similarly.

Hth,
Merjet

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Copy values only

Francis,

You make the choice at paste time, try:-

Sub atlantic()
RowNum = ActiveCell.Row
Cells(RowNum, 29).Copy
Cells(28, 5).PasteSpecial Paste:=xlPasteValues
Cells(RowNum + 1, 29).Copy
Cells(30, 5).PasteSpecial Paste:=xlPasteValues
Cells(RowNum + 2, 29).Copy
Cells(32, 5).PasteSpecial Paste:=xlPasteValues
End Sub

Mike

"Francis Hookham" wrote:

RowNum = ActiveCell.Row
Cells(RowNum, 29).Copy Destination:=Cells(28, 5)
Cells(RowNum + 1, 29).Copy Destination:=Cells(30, 5)
Cells(RowNum + 2, 29).Copy Destination:=Cells(32, 5)

seems to copy everything.

can this be modified to copy only values only?

Francis Hookham



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Copy values only


try this idea for values only. Ranges must the same size.
cells(28, 5).value=Cells(RowNum, 29).value

or maybe this to do it all
rownum=1
for i=28 to 32 step 2
cells(i,5).value=cells(rownum,29).value
rownum =rownum+1
next


--
Don Guillett
SalesAid Software

"Francis Hookham" wrote in message
...
RowNum = ActiveCell.Row
Cells(RowNum, 29).Copy Destination:=Cells(28, 5)
Cells(RowNum + 1, 29).Copy Destination:=Cells(30, 5)
Cells(RowNum + 2, 29).Copy Destination:=Cells(32, 5)

seems to copy everything.

can this be modified to copy only values only?

Francis Hookham


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Copy values only

Many thanks Don - the neatness of your second suggestion was what I was
looking for.

Thanks too to Merjet and Mike.

Francis


"Don Guillett" wrote in message
...

try this idea for values only. Ranges must the same size.
cells(28, 5).value=Cells(RowNum, 29).value

or maybe this to do it all
rownum=1
for i=28 to 32 step 2
cells(i,5).value=cells(rownum,29).value
rownum =rownum+1
next


--
Don Guillett
SalesAid Software

"Francis Hookham" wrote in message
...
RowNum = ActiveCell.Row
Cells(RowNum, 29).Copy Destination:=Cells(28, 5)
Cells(RowNum + 1, 29).Copy Destination:=Cells(30, 5)
Cells(RowNum + 2, 29).Copy Destination:=Cells(32, 5)

seems to copy everything.

can this be modified to copy only values only?

Francis Hookham






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
copy between worksheets does not copy formulae just values Chris@1000 Oaks Excel Discussion (Misc queries) 0 March 19th 06 11:44 AM
Copy/Paste how to avoid the copy of formula cells w/o calc values Dennis Excel Discussion (Misc queries) 10 March 2nd 06 10:47 PM
How do i compare values from two sheet and copy & paste if values match? rozb Excel Programming 0 March 5th 04 12:06 AM
compare values between workbooks and copy values bgardiner Excel Programming 0 September 9th 03 03:54 PM
Range COPY function - how to copy VALUES and not formulas James Cooke Excel Programming 1 August 21st 03 07:04 PM


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

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"