Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
exact copy | Excel Worksheet Functions | |||
How to paste exact value into another cell? | Excel Worksheet Functions | |||
Exact Copy | Excel Discussion (Misc queries) | |||
Exact formula copy. | Excel Discussion (Misc queries) | |||
How to do the exact copy of a formula | Excel Worksheet Functions |