LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default exact copy/paste


Hi there,

I often need to perform an "exact copy-paste", i.e.

=$a$1+b1

gets copied two lines below as

=$a$1 + b1

and not as

=$a$1 + b3

I obviously would like this done without having to change "b1" t
"$b$1". Since I could not find any tips or functions to get this done
I suppose that I will have to write a VB macro to do that. Here is ho
I see it:

1. I select a range of cells, and do a CTRL-C to get those in the cli
board
2. I select a traget cell
3. I do a, say, CTRL-SHF-V to perform my exact copy to the ne
location.

My VB experience is close to zero, and OO competence is absolutel
zero.

I could manage (see code below) to get this done via input boxes, bu
I would like to replace the input selection by taking copied cell
directly from the clipboard, and to replace the output selection b
getting location of active cell and pasting from there.

Can anyone help?

thx a lot,
jm


Dim mycells1, mycells2 As Range
Dim cells As Range
Dim i, cellules, cell(100)
Set mycells1 = Application.InputBox(prompt:="Input range.", _
Title:="Exact Copy-Paste", Left:=500, Top:=300, Type:=8)
i = 1
For Each cellules In mycells1
cell(i) = cellules.Value
i = i + 1
Next

i = 1
Set mycells2 = Application.InputBox(prompt:="Output range.", _
Title:="Exact Copy-Paste", Left:=500, Top:=300, Type:=8)

For Each cellules In mycells2
cellules.Value = cell(i)
i = i + 1
Nex

--
jmwisme
-----------------------------------------------------------------------
jmwismer's Profile: http://www.excelforum.com/member.php...fo&userid=2820
View this thread: http://www.excelforum.com/showthread.php?threadid=47742

 
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
exact copy Jean-Paul Excel Worksheet Functions 5 October 16th 08 11:45 AM
How to paste exact value into another cell? Lewis0205NC Excel Worksheet Functions 4 January 17th 07 11:26 PM
Exact Copy Saxman Excel Discussion (Misc queries) 3 May 25th 06 07:21 PM
Exact formula copy. Richard Excel Discussion (Misc queries) 2 December 20th 05 05:21 PM
How to do the exact copy of a formula Michal Excel Worksheet Functions 8 October 20th 05 04:27 PM


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