ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   copy/paste scenario (https://www.excelbanter.com/excel-worksheet-functions/125360-copy-paste-scenario.html)

ohdharleyboy

copy/paste scenario
 
Hello all-

I have a 5500 row spreadsheet. The info on the even rows needs to be added
to the end of the odd rows. Any quicker way than cutting/pasting every even
row to the end of the odd row?

Don Guillett

copy/paste scenario
 
Sub appendeventooodd()
lr = Cells(Rows.Count, "a").End(xlUp).Row
For i = lr To 2 Step -2
Cells(i - 1, "a") = Cells(i - 1, "a") & " " & Cells(i, "a")
Next i
End Sub


--
Don Guillett
SalesAid Software

"ohdharleyboy" wrote in message
...
Hello all-

I have a 5500 row spreadsheet. The info on the even rows needs to be
added
to the end of the odd rows. Any quicker way than cutting/pasting every
even
row to the end of the odd row?




ohdharleyboy

copy/paste scenario
 
Thanks Don-

Do I run this as a formula or as a script against the workbook?

"Don Guillett" wrote:

Sub appendeventooodd()
lr = Cells(Rows.Count, "a").End(xlUp).Row
For i = lr To 2 Step -2
Cells(i - 1, "a") = Cells(i - 1, "a") & " " & Cells(i, "a")
Next i
End Sub


--
Don Guillett
SalesAid Software

"ohdharleyboy" wrote in message
...
Hello all-

I have a 5500 row spreadsheet. The info on the even rows needs to be
added
to the end of the odd rows. Any quicker way than cutting/pasting every
even
row to the end of the odd row?





Dave F

copy/paste scenario
 
This is a macro, not a formula. It should be pasted in a module in the
visual basic editor...

Post back if you have questions.

Dave
--
Brevity is the soul of wit.


"ohdharleyboy" wrote:

Thanks Don-

Do I run this as a formula or as a script against the workbook?

"Don Guillett" wrote:

Sub appendeventooodd()
lr = Cells(Rows.Count, "a").End(xlUp).Row
For i = lr To 2 Step -2
Cells(i - 1, "a") = Cells(i - 1, "a") & " " & Cells(i, "a")
Next i
End Sub


--
Don Guillett
SalesAid Software

"ohdharleyboy" wrote in message
...
Hello all-

I have a 5500 row spreadsheet. The info on the even rows needs to be
added
to the end of the odd rows. Any quicker way than cutting/pasting every
even
row to the end of the odd row?





ohdharleyboy

copy/paste scenario
 
Thanks Dave and Don - this worked like a charm!

"Dave F" wrote:

This is a macro, not a formula. It should be pasted in a module in the
visual basic editor...

Post back if you have questions.

Dave
--
Brevity is the soul of wit.


"ohdharleyboy" wrote:

Thanks Don-

Do I run this as a formula or as a script against the workbook?

"Don Guillett" wrote:

Sub appendeventooodd()
lr = Cells(Rows.Count, "a").End(xlUp).Row
For i = lr To 2 Step -2
Cells(i - 1, "a") = Cells(i - 1, "a") & " " & Cells(i, "a")
Next i
End Sub


--
Don Guillett
SalesAid Software

"ohdharleyboy" wrote in message
...
Hello all-

I have a 5500 row spreadsheet. The info on the even rows needs to be
added
to the end of the odd rows. Any quicker way than cutting/pasting every
even
row to the end of the odd row?




Don Guillett

copy/paste scenario
 
Glad to help.

--
Don Guillett
SalesAid Software

"ohdharleyboy" wrote in message
...
Thanks Dave and Don - this worked like a charm!

"Dave F" wrote:

This is a macro, not a formula. It should be pasted in a module in the
visual basic editor...

Post back if you have questions.

Dave
--
Brevity is the soul of wit.


"ohdharleyboy" wrote:

Thanks Don-

Do I run this as a formula or as a script against the workbook?

"Don Guillett" wrote:

Sub appendeventooodd()
lr = Cells(Rows.Count, "a").End(xlUp).Row
For i = lr To 2 Step -2
Cells(i - 1, "a") = Cells(i - 1, "a") & " " & Cells(i, "a")
Next i
End Sub


--
Don Guillett
SalesAid Software

"ohdharleyboy" wrote in
message
...
Hello all-

I have a 5500 row spreadsheet. The info on the even rows needs to
be
added
to the end of the odd rows. Any quicker way than cutting/pasting
every
even
row to the end of the odd row?







All times are GMT +1. The time now is 12:37 AM.

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