Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to write a function or macro to copy

Please help...

I need to know how to write a function or macro to copy the contents of
cell (A) to cell (C) and contents of a cell (B)to the comments of cell
(C). Additionally I need to execute this accross several sheets in a
workbook, how would I do that?


i.e. A1 copied to C1; B1 copied to the comments of C1 or
Worksheet1.A1 copied to Worksheet2.C5; Worksheet1.B2 copied to comments
of Worksheet2.c5.

Thanks for your help

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 145
Default How to write a function or macro to copy

change cells(1,3) to sheets(1).cells(1,3) and the like.

From: "RandEman"
Subject: How to write a function or macro to copy
Date: Saturday, September 03, 2005 1:31 AM

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



--
Regards
PY & Associates
Excel customization service provider

wrote in message
ups.com...
Please help...

I need to know how to write a function or macro to copy the contents of
cell (A) to cell (C) and contents of a cell (B)to the comments of cell
(C). Additionally I need to execute this accross several sheets in a
workbook, how would I do that?


i.e. A1 copied to C1; B1 copied to the comments of C1 or
Worksheet1.A1 copied to Worksheet2.C5; Worksheet1.B2 copied to comments
of Worksheet2.c5.

Thanks for your help



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
write a copy/paste from one workbook to another in a macro Jennrl Excel Discussion (Misc queries) 1 August 7th 09 10:37 PM
How to write a simple copy-paste macro? R. H. Rosenberg New Users to Excel 4 November 25th 06 12:26 AM
How to write a function or macro to copy RandEman Excel Programming 6 November 24th 05 07:40 PM
how do I write macro to copy the value of a cell to another if va. Prabhu Excel Programming 3 June 12th 05 01:33 PM
Write a macro ro copy column at certain time of day. Daytrader Excel Programming 2 February 2nd 04 05:28 AM


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