Xcel Macro

Closed
ravali.koganti Posts 4 Registration date Thursday 19 June 2014 Status Member Last seen 20 June 2014 - 19 Jun 2014 à 11:43
ravali.koganti Posts 4 Registration date Thursday 19 June 2014 Status Member Last seen 20 June 2014 - 20 Jun 2014 à 09:32
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
19 Jun 2014 à 13:50
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
ravali.koganti Posts 4 Registration date Thursday 19 June 2014 Status Member Last seen 20 June 2014
20 Jun 2014 à 00:12
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.
Blocked Profile
20 Jun 2014 à 08:14
Ok. Well your scope just got way bigger. What cell is going to have Last months date?
ravali.koganti Posts 4 Registration date Thursday 19 June 2014 Status Member Last seen 20 June 2014
20 Jun 2014 à 09:32
And you dont have to work on request 3). Its taken care of.
ravali.koganti Posts 4 Registration date Thursday 19 June 2014 Status Member Last seen 20 June 2014
20 Jun 2014 à 09:30
Last day of previous month date in cell A2-A12