Paste Values Help

miseryofreflection

Board Regular
Joined
Jun 13, 2009
Messages
105
Just need some minor tweaks to this macro
1) Would also like to paste format
2) Would like to include when macro was run and author in f2 and f3

Sub Retention()

Range("'Finance View Summary'!D10:BN34").Copy
Sheets("Retention").Range("a" & Rows.Count).End(xlUp).Offset(1).PasteSpecial Paste:=xlPasteValues


End Sub
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
does this work?

Code:
Sub Retention()
Dim UserID As String
UserID = Environ("USERNAME")
 
Range("'Finance View Summary'!D10:BN34").Copy
Sheets("Retention").Activate
Range("a" & Rows.Count).End(xlUp).Offset(1).PasteSpecial Paste:=xlPasteValues
Range("F2") = Date
Range("E2") = UserID
 
End Sub
 
Upvote 0
Almost!!!!

1) I would like Range("F2") = Date Range("E2") = UserID to be moving each time the macro is exec so it stays with the area

2) Just need to paste the formatting as well

Then all done
 
Upvote 0
so where in relation to the copy/paste data would it go? It can't go into row 10 since there will be data there? It would seem like the only place would be in columns a-c
 
Upvote 0
so where in relation to the copy/paste data would it go? It can't go into row 10 since there will be data there? It would seem like the only place would be in columns a-c

G10:BM16 are all empty, no data is there, just black cells. So it could go there.

So G11, G12 would be ideal
Thanks!
 
Upvote 0
G10:BM16 are all empty, no data is there, just black cells. So it could go there.

So G11, G12 would be ideal
Thanks!

your macro shows
D10:BN34 area being copied, then you paste into start column A, therefore G11 & G12 will be copied over. Or am I missing something?
 
Upvote 0
your macro shows
D10:BN34 area being copied, then you paste into start column A, therefore G11 & G12 will be copied over. Or am I missing something?

thats exactly correct. All that needs to happen is have the date/author stamp to be added after cells have been copied over starting in col a.

The cells i mention have no data so pasting over is fine.
 
Upvote 0
not sure I fully understand - is this what you need?

Code:
Sub Retention()

Dim UserID As String
UserID = Environ("USERNAME")
 
Range("'Finance View Summary'!D10:BN34").Copy
Sheets("Retention").Activate
RCell = Range("a" & Rows.Count).End(xlUp).Offset(1).Row
Cells(RCell, "A").PasteSpecial Paste:=xlPasteValues
Cells(RCell, "G") = Date
Cells(RCell, "F") = UserID
 
End Sub
 
Upvote 0

Forum statistics

Threads
1,211,871
Messages
6,104,477
Members
447,911
Latest member
rkramapo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top