ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Rows (https://www.excelbanter.com/excel-programming/399882-excel-rows.html)

Michael Grayson

Excel Rows
 
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.

Niek Otten

Excel Rows
 
One of many ways:

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

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Michael Grayson" wrote in message . ..
|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.



Gary''s Student

Excel Rows
 
Sub sonic()
Range("A2").Copy Range("B1")
Range("A2").EntireRow.Delete
End Sub

--
Gary''s Student - gsnu200750


"Michael Grayson" wrote:

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.



All times are GMT +1. The time now is 05:24 PM.

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