• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA macro Copy Paste formula instead of Values only

>>> use code - tags <<<
Code:
Sub CopyPaste()
    'Declares Varibles
Dim copyRange As Range, pasteRange As Range

'Sets where were are coping from
Sheets("Product").Select
Set copyRange = Range("A1:H51").CurrentRegion

'Filter for anything over 0
Range("G1:G51").AutoFilter field:=1, Criteria1:=">0"

'Copy only filtered rows and paste in AA1
copyRange.SpecialCells(xlCellTypeVisible).Copy Range("AA1")

'Turn off filter
ActiveSheet.AutoFilterMode = False
End Sub

My problem is that when I run the macro it copy paste the formula's to AA1 aswell. I only need it to copy the values.

Thanks

Chris
 

Attachments

  • Jacques v1.xlsm
    47.9 KB · Views: 7
Last edited by a moderator:
Hi vietm
I need your help again, PLEASE !
I refer to my attached file, sheet Audit_Trail.
I am looking for a VBA code that will only Print the data in my Audit_Trail sheet (Column A:G) and/or ( Column I:M) for the last date or for the period between two dates.
Can you please help or direct me to a article covering this.
Regards

Chris
 
Back
Top