View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
RandEman RandEman is offline
external usenet poster
 
Posts: 3
Default How to write a function or macro to copy

One more question, I need to run this accross several sheets in a workbook,
how would I do that?

"Gary's Student" wrote:

Try this:

Sub temp()
Cells(1, 3).Value = Cells(1, 1).Value
Cells(1, 3).AddComment
Cells(1, 3).Comment.Text Text:=Cells(1, 2).Value
End Sub

Its pretty neat. You can insert or modify all cells in a range with this
kind of technique

Have a good day!
--
Gary's Student


"RandEman" wrote:

Please help...

I need to know how to write a function or macro to copy the contents of cell
(A1) to cell (C1) and contents of a cell (B1)to the comments of cell (C1).

i.e. A1 copied to C1; B1 copied to the comments of C1

Thanks for your help