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" to "$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 how I see it:
1. I select a range of cells, and do a CTRL-C to get those in the clip board
2. I select a traget cell
3. I do a, say, CTRL-SHF-V to perform my exact copy to the new location.
My VB experience is close to zero, and OO competence is absolutely zero.
I could manage (see code below) to get this done via input boxes, but I would like to replace the input selection by taking copied cells directly from the clipboard, and to replace the output selection by 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
Next
Bookmarks