Match columns

  • Thread starter Thread starter light
  • Start date Start date
L

light

A B
1 x 1
1 x 2
1 x 3
1 x 4
1 x 5
1 x 6
2 x 7
2 x 8
2 x 9
2 x 10
2 x
2 x
3 x
3 x
3 x
ETC....to 10

Actually column A goes down about 1000 rows. Number of times a numbe
is reapeated in column A varies. Numbers in column C varies an
determines the range of numbers in A.I need a macro that will matc
column C to all the numbers in Column A. Cannot use a fill proceedur
as this is part of a larger program. So result should look like.

B]A B C[/B]
1 x 1
1 x 1
1 x 1
1 x 1
1 x 1
1 x 1
2 x 2
2 x 2
2 x 2
2 x 2
2 x 2
2 x 2
3 x 3
3 x 3
3 x 3.....Et
 
try

Code:
--------------------

Sub test()
With Range("a1").CurrentRegion.Resize(,1).Offset(,2)
.FormulaR1C1="=RC1"
.Value=.Value
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top