Copy, find & paste... oh my -- Please help!!!

  • Thread starter Thread starter Father Guido
  • Start date Start date
F

Father Guido

How would I go about copy some contents, finding a cell based on another
cell, then offsetting from it and pasting the data?

Here's what I have.

A cell into which I will put a number (1-270), the adjacent two cells I
wish to copy then find the original cell in another range, offset from
it and paste the copied data.

Is there some kind of reverse lookup function I can use to goto a cell?

Example. I write the 25, 3, and 55 in three adjacent vertical cells.

25
3
55

I want to 'lookup/goto' the first number (25) the another range, then
paste the 3 and 55 into horizontally adjacent cells.

1
2
3
~
24
25 3 55
26

Prefer a macro solution to automate this procedure, as I have to do it
270 times. Thanks in advance!!!

Norm

Father Guido
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
I plan on living forever... so far, so good
 
Norm,

Try this macro, after selecting the cell with the 25 in it: this
assumes that the 'other range' is on the same sheet.

Sub CopyMatchTranspose()
Dim myCell As Range

Set myCell = ActiveCell
myCell(2).Resize(2, 1).Copy
'The next line(s) should all be on one line when copied into your
module
Range("A:A").Cells(Application.Match(myCell.Value, Range("A:A"),
False))(1, 2).PasteSpecial Transpose:=True

End Sub

HTH,
Bernie
 
Back
Top