LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Macros to Cut and Paste

I have the following macro and I need one additional step after it finished the macro. The initial macro added 10 rows until the last person is there, but there are values in b1, b10,b20, etc and I need those values to cut and pasted in a10, a15 and so on until the last value has been posted. If somebody can help I would really appreciate it.

Sub insert_rows(
Dim lastrow As Lon
Dim row_index As Lon

lastrow = ActiveSheet.Cells(rows.Count, "A").End(xlUp).ro
For row_index = lastrow - 1 To 1 Step -
If Cells(row_index, "A").Value < Cells(row_index + 1, "A").Value The
Cells(row_index + 1, "A").Resize(10, 1).EntireRow.insert (xlShiftDown
Range(Selection, Selection.End(xlDown)).Selec
Range(Selection, Selection.End(xlToRight)).Selec

End I
Nex

End Su


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macros to copy and paste data Migyu Excel Discussion (Misc queries) 1 August 26th 08 01:25 PM
Problem with copy and paste together with macros Camper Joe Excel Worksheet Functions 2 August 24th 06 05:24 PM
Working with Macros-Activesheet.Paste lunar1085 Excel Discussion (Misc queries) 0 February 3rd 06 04:13 PM
Copy and Paste Macros dickives Excel Discussion (Misc queries) 0 January 20th 06 08:49 PM
cut and paste macros along with lookup hey Excel Programming 1 June 1st 04 03:31 PM


All times are GMT +1. The time now is 10:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"