christechgeek
New Member
- Joined
- Sep 1, 2012
- Messages
- 7
I have a macro that pastes information copied from a main sheet ('Current Month') and pastes it into another sheet. What I'd like to do is to add code to go back to my 'Current Month' sheet and clear the contents of the cells that I copied. My only problem is that I can't just clear all cells in the selected range, because there are some formulas in 3 columns.
So what I want to do after the macro is ran to paste the data, is go back to my 'Current Month' sheet and clear the copied cells except for columns F,L AND O.
If possible, it would best to clear range B:E, M:N & R:S based on the word "Funded" being in column P. My criteria "Funded" is based on a droplist and the only rows that I will be concerned with would be from rows 470:520.
Here is my Paste data macro that I would like to add this code to:
I appreciate any help you can give me! Thanks!
So what I want to do after the macro is ran to paste the data, is go back to my 'Current Month' sheet and clear the copied cells except for columns F,L AND O.
If possible, it would best to clear range B:E, M:N & R:S based on the word "Funded" being in column P. My criteria "Funded" is based on a droplist and the only rows that I will be concerned with would be from rows 470:520.
Here is my Paste data macro that I would like to add this code to:
PHP:
Sub PasteValuesOnly()
'
' PasteValuesOnly Macro
'
On Error GoTo Err
ActiveSheet.Select
Range("A" & Rows.Count).End(xlUp).Offset(1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Err:
x = MsgBox("Nothing copied")
End Sub
I appreciate any help you can give me! Thanks!