ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Match columns (https://www.excelbanter.com/excel-programming/363856-match-columns.html)

light

Match columns
 

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

--
ligh
-----------------------------------------------------------------------
light's Profile: http://www.excelforum.com/member.php...nfo&userid=722
View this thread: http://www.excelforum.com/showthread.php?threadid=55048


jindon[_49_]

Match columns
 

try

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

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

--------------------


--
jindon
------------------------------------------------------------------------
jindon's Profile: http://www.excelforum.com/member.php...o&userid=13135
View this thread: http://www.excelforum.com/showthread...hreadid=550488



All times are GMT +1. The time now is 09:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com