Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default I need macro

On sheet1 in row2 I have formulas in some cells and comments in some cells.
I want macro which copy entire row2 from sheet1 and paste on sheet2 and
row3.I don't need formulas only values from cells and comments.


--
Message posted using http://www.talkaboutsoftware.com/gro...l.programming/
More information at http://www.talkaboutsoftware.com/faq.html

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default I need macro

If this isn't going to be done repetatively, just do it manually.
Highlight the rows that you want to copy and select Copy. Go to where
you want to paste them and right click and select Paste Special. Then
select Values and click OK. Then, immediately after clicking OK,
right click and select Paste Special again. This time, select
Comments and click OK.

If you have to have this in a macro, use something like below.
Sheets("Sheet1").Rows(2).Copy
Sheets("Sheet2").Rows(3).PasteSpecial _
Paste:=xlPasteValues
Sheets("Sheet2").Rows(3).PasteSpecial _
Paste:=xlPasteComments
Application.CutCopyMode = False

Alen32 wrote:
On sheet1 in row2 I have formulas in some cells and comments in some cells.
I want macro which copy entire row2 from sheet1 and paste on sheet2 and
row3.I don't need formulas only values from cells and comments.


--
Message posted using http://www.talkaboutsoftware.com/gro...l.programming/
More information at http://www.talkaboutsoftware.com/faq.html


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default I need macro

Sub getvalues()
Sheets("sheet2").Rows(3).Value = _
Sheets("sheet1").Rows(2).Value
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Alen32" wrote in message
lkaboutsoftware.com...
On sheet1 in row2 I have formulas in some cells and comments in some
cells.
I want macro which copy entire row2 from sheet1 and paste on sheet2 and
row3.I don't need formulas only values from cells and comments.


--
Message posted using
http://www.talkaboutsoftware.com/gro...l.programming/
More information at http://www.talkaboutsoftware.com/faq.html


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default I need macro

Don, that code works fine to get the values, but the OP wanted to get
the comments as well.

Don Guillett wrote:
Sub getvalues()
Sheets("sheet2").Rows(3).Value = _
Sheets("sheet1").Rows(2).Value
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Alen32" wrote in message
lkaboutsoftware.com...
On sheet1 in row2 I have formulas in some cells and comments in some
cells.
I want macro which copy entire row2 from sheet1 and paste on sheet2 and
row3.I don't need formulas only values from cells and comments.


--
Message posted using
http://www.talkaboutsoftware.com/gro...l.programming/
More information at http://www.talkaboutsoftware.com/faq.html


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default I need macro


As Bubba said, it depends on your definition of "is" is. "comments" could
mean
in b1 =a1*2
in c1 "Gee that was two"
or it could be what you offered. Or,

Sub getvalues1()
With Sheets("sheet2").Rows(3)
Sheets("sheet1").Rows(2).Copy
.PasteSpecial Paste:=xlValues
.PasteSpecial Paste:=xlPasteComments
End With
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"JW" wrote in message
ups.com...
Don, that code works fine to get the values, but the OP wanted to get
the comments as well.

Don Guillett wrote:
Sub getvalues()
Sheets("sheet2").Rows(3).Value = _
Sheets("sheet1").Rows(2).Value
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Alen32" wrote in message
lkaboutsoftware.com...
On sheet1 in row2 I have formulas in some cells and comments in some
cells.
I want macro which copy entire row2 from sheet1 and paste on sheet2 and
row3.I don't need formulas only values from cells and comments.


--
Message posted using
http://www.talkaboutsoftware.com/gro...l.programming/
More information at http://www.talkaboutsoftware.com/faq.html



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
AutoRun Macro with a delay to give user the choice to cancel the macro wanderlust Excel Programming 2 September 28th 07 04:09 PM
Macro not showing in Tools/Macro/Macros yet show up when I goto VBA editor [email protected] Excel Programming 2 March 30th 07 07:48 PM
Need syntax for RUNning a Word macro with an argument, called from an Excel macro Steve[_84_] Excel Programming 3 July 6th 06 07:42 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 05:55 AM.

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"