Excel Rows

  • Thread starter Thread starter Michael Grayson
  • Start date Start date
M

Michael Grayson

I have an excel worksheet with 5500 rows of data. In one column, I have
this

A(1)= "Sample Data"
A(2)= "New Data"
A(3)= "Any Data"
A(4)= "Same Data"

etc, to A(5500)

What I want to do is cut the data from A(2) and Paste it in B(1), so that
A(1) = "Sample Data" and B(1) = "New Data"

Then I want to Delete ROW(A(2))and shift the remaining rows up.
 
One of many ways:

Range("A2").Cut
ActiveSheet.Paste Destination:=Range("B1")
Range("A2").Delete Shift:=xlUp

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

|I have an excel worksheet with 5500 rows of data. In one column, I have
| this
|
| A(1)= "Sample Data"
| A(2)= "New Data"
| A(3)= "Any Data"
| A(4)= "Same Data"
|
| etc, to A(5500)
|
| What I want to do is cut the data from A(2) and Paste it in B(1), so that
| A(1) = "Sample Data" and B(1) = "New Data"
|
| Then I want to Delete ROW(A(2))and shift the remaining rows up.
 
Sub sonic()
Range("A2").Copy Range("B1")
Range("A2").EntireRow.Delete
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