VB, having trouble with code

Closed
weenie - Sep 11, 2010 at 02:22 PM
 kalyanasundaram - Sep 14, 2010 at 02:01 AM
Hello,
I have tried a few ways and it keeps closing out on me I have 2 columns, J & K which I would like to move the values in column K to empty areas of Column J. There is over 650,000 rows and I don't know how to write this code. I am pasting my code & example of the 2 columns I am working with below:

Sub Trying()
Dim x
Dim Cell As Range

x = 2
Do
Range("J2").Select
If Cells(x, 10).Value = "" Then
Cells(x, 10).Value = Cells(x, 11).Value
x = x + 1
End If
Loop

End Sub

J K
(20/0.31)
(20/0.31)
(20/0.31)
(20/0.29)
(20/0.29)
(20/0.29)
(20/0.29)
(20/0.29)
(20/0.29)
(20/0.29)
(20/0.29)
(20/0.29)
(20/0.29)
(20/15)
(20/15)
(20/15)
(20/15)
(20/15)
(20/15)
(20/15)
(20/15)
(20/15)
(20/15)
(20/5.5)
(20/5.5)
(20/5.5)
(20/5.5)
(20/5.5)
(20/5.5)
(20/5.5)
(20/5.5)
(20/5.5)
(20/5.5)
(20/1.0)
(20/1.0)
(20/1.0)
(20/1.0)
(20/1.0)
(20/1.0)
(20/1.0)
(20/1.0)
(20/1.0)
(20/1.0)
(20/0.8)
(20/0.8)
(20/0.8)
(20/0.8)
(20/0.8)
(20/0.8)
(20/0.8)
(20/0.8)
(20/0.8)
(20/0.8)
(20/0.6)
(20/0.6)
(20/0.6)
(20/0.6)
(20/0.6)
(20/0.6)
(20/0.6)
(20/0.6)
(20/0.55)
(20/0.55)
(20/0.55)
(20/0.55)
(20/0.55)
(20/0.55)
(20/0.55)
(20/0.55)
(20/0.55)
(20/0.50)
(20/0.50)


2 replies

For some reason it moved all values together when I posted.

J K
(20/1.0)
(20/1.0)
(20/1.0)
(20/1.0)
(20/1.0)
(20/1.0)
(20/1.0)
(20/1.0)
(20/1.0)
(20/1.0)
(20/0.8)
(20/0.8)
(20/0.8)
(20/0.8)
(20/0.8)
(20/0.8)
(20/0.8)
(20/0.8)
(20/0.8)
(20/0.8)
0
kalyanasundaram
Sep 14, 2010 at 02:01 AM
simple way to move data from one col to other
0