LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Macro to copy text upon entry into cell

name range the "comment" cell page1.comment and the "info" cell as page1.info

ad this code to a standard module

Option Explicit

Sub MoveComment()
Dim sComment As String
Dim sInfo As String
Dim rw As Long

With Worksheets("page1")
sComment = .Range("page1.comment").Value
sInfo = .Range("page1.info").Value
End With

If sComment < "" And sInfo < "" Then



With Worksheets("page2")
rw = .Range("A65000").End(xlUp).Row + 1

.Cells(rw, 1).Value = sComment
.Cells(rw, 2).Value = sInfo


End With

End If

End Sub

for example
you could call this automatically using the sheets CHANGE event...test if
both cells have data, if they do, call the sub above.


"RAP" wrote:

Greetings,

I have a column labeled COMMENTS on Pg 1. I am attempting to write a macro
that will copy the text entered into a cell on Pg 1 comment column, to the
next empty cell on a Pg 2 comment column.

I also want to copy the info from column 1 of the Pg 1 comment row to
another column, same row, as Pg 2 copied comment.

Thanks for any help as I start putting the VB "pieces of the puzzle"
together. I have a strategy. Now I am working on programming methodology.
Thanks, -Randy

 
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
how to copy a value from another cell by using a one key entry jgpac00000 Excel Discussion (Misc queries) 1 April 28th 09 08:13 PM
copy value of cell from last entry in column Jay Trull Excel Worksheet Functions 1 April 23rd 06 03:10 AM
Data entry - Copy contents of cell typed in one cell to another ce danie Excel Worksheet Functions 2 March 16th 06 06:51 PM
Auto-copy the last entry in a column to a new cell George F Excel Worksheet Functions 2 November 18th 05 07:36 PM
Macro to copy text to a specific cell reference shanman_lmtd Excel Programming 3 July 23rd 04 03:32 PM


All times are GMT +1. The time now is 12:15 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"