PDA

View Full Version : Paste special data till last updated row



gvreddyhr
03-05-2013, 12:44 AM
Hi ,

Thank you very much for continuous support for my previous posts, I require help in tweaking the code.

I have the data in excel where team updates trackers and lot of formulas are put in place, now I want to give option to freeze the data, when they “Freezedata” macro, which they have updated should be copied and paste special values in the same rows, the dependent row would be E7 to (xldown), can anyone help me with tweaking this code

Sub freezedata()
Range(Selection, Selection.End(xlDown)).Select
Rows("7:86").Select
Range("E7").Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("E7").Select
End Sub



Regards,
GV Reddy

SamT
03-05-2013, 09:06 AM
GV Reddy,

You don't say what is the problem, but, just to clean up your recorded macro:

Sub freezedata()
Dim Rng As Range
Set Rng = Range("E7", Range("E7").End(xlDown))
Rng.Copy
Rng.PasteSpecial Paste:=xlPasteValues
Range("E7").Select ' For User Convenince
End Sub

gvreddyhr
03-05-2013, 10:46 AM
Hi Sam,

Sorry for not being clear, I will rephrase it for better understanding.
I have “sheet1” with information from column E to Z whereinwe update the data in daily basis, and I have put formulas in column AA to AZbased on the data which updated in columns E to z.
Now I would like to write a code to select the data based oncolumn E (Range("E7").End(xlDown)), and I would like to select theentire rows (column E to AZ) copy and paste special values there.

Regards,
GVR

SamT
03-05-2013, 10:57 AM
GV Reddy,

What criteria to use to select Cell data?

Rng.EntireRow.Copy to prepare for paste

I must go after this post. I will return tomorrow?

Good luck

gvreddyhr
03-05-2013, 07:32 PM
Thanks Sam,

It works great. I am glad to draw your attention on this.

Once again thank you so much.