Xcel Macro

Closed
ravali.koganti Posts 4 Registration date Thursday June 19, 2014 Status Member Last seen June 20, 2014 - Jun 19, 2014 at 11:43 AM
ravali.koganti Posts 4 Registration date Thursday June 19, 2014 Status Member Last seen June 20, 2014 - Jun 20, 2014 at 09:32 AM
I need to copy the first 11 rows in excel, shift 11 rows down and paste these copied 11 rows there. how can I do that.

3 responses

Blocked Profile
Jun 19, 2014 at 01:50 PM
OK, so I opened up Excel, and starting recording a macro.

I ended up with the following:


Rows("1:11").Select
Selection.Copy
Rows("1:1").Select
Selection.Insert Shift:=xlDown


I hope this helps.

"If you can't soar with the eagles, then don't fly with the flock!" - Oliver Sykes; Bring Me The Horizon
0
ravali.koganti Posts 4 Registration date Thursday June 19, 2014 Status Member Last seen June 20, 2014
Jun 20, 2014 at 12:12 AM
Thankyou very much for the macro. It worked perfectly fine for me. I have few more requirements on this. Will you be able to help me further.

1) After I made the selection and copied the 11 rows on top by shifting the cells down, the first column is a date column. I want to change that date to the last day of the previous month on all the 11 rows.

2) TENOR LIBOR TREASURY PRIME LP WFC
1 0.15 0.0355 3.25 0.15 0.30337877
3 0.23 0.0355 3.25 0.15 0.38133851

This is how my data from column 2 looks like in my current excel.

The recent values are present in a other excel. From there I need to find tenor = 1 and update the rest of the values. Similarly find tenor = 2 and update the rest of the values

3) I need to have a formula in the last column to insert all these values into a table so that I can copy the insert and run the insert

I know this is a long request. But I am very basic to excel VBA. Please help.
0
Blocked Profile
Jun 20, 2014 at 08:14 AM
Ok. Well your scope just got way bigger. What cell is going to have Last months date?
0
ravali.koganti Posts 4 Registration date Thursday June 19, 2014 Status Member Last seen June 20, 2014
Jun 20, 2014 at 09:32 AM
And you dont have to work on request 3). Its taken care of.
0
ravali.koganti Posts 4 Registration date Thursday June 19, 2014 Status Member Last seen June 20, 2014
Jun 20, 2014 at 09:30 AM
Last day of previous month date in cell A2-A12
0