VBA paste as values - how to

user3496218

I have some VBA code that copys a range from one sheet and then pastes it to another at the first blank line. What it is copying are vlookup formulas so when it pastes it pastes all 0's, how would I go about getting it to paste what it copies as values so the results are retained?

Code:

Private Sub PasteChartDataQtyCompare()
'This step pastes the range of values to the chart data tab
    Sheets(1).Range("A6:J22").Copy _
    Destination:=Sheets("Chart Data").Cells(Sheets("Chart Data").Rows.Count, 1).End(xlUp).Offset(1, 0)
End Sub

user4039065

Transfer the values directly bypassing the clipboard.

Private Sub PasteChartDataQtyCompare()
    'This step pastes the range of values to the chart data tab
    with workSheets(1).Range("A6:J22")
        workSheets("Chart Data").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).resize(.rows.count,.columns.count) = .value
    end with
End Sub

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to paste values in a certain text position in VBA?

How to copy paste values within a VBA Loop?

vba filter and paste as values

Excel VBA - Paste as values

How to copy paste all formats AND values without using select in vba

How to paste values on every page of word document from excel vba?

VBA: Paste Values instead of formulas

VBA Paste values - Response time

Filter and Copy Paste the Values VBA

Copy paste as values Excel VBA

Paste the final output of my vba code as values

Excel VBA Copy Paste Values only

Need guidance with a VBA function to paste values in Excel

VBA Copy range values and paste in another sheet

VBA copy and paste pivot values and format

How can I skip non-numeric values when copy and paste using loop in VBA?

How to copy the values in a range from one sheet to and paste it another sheet on a predefied order using VBA?

How to move paste range while using VBA?

How to capture paste event for all worksheets in VBA?

How to paste array into a range [VBA] - Error 1004

How to copy a range and paste diagonally using vba

VBA - How to copy a column once but paste it twice?

how to paste specific columns of data with if statement vba

How to copy/paste a table in footer word vba

VBA How To Paste With Blank One Column Over?

How to paste multiple values into multiple form inputs in one paste?

How to run a VBA code that copies a range of cells from an active sheet and paste it in a new workbook (only values and formatting and no formulates)?

Repeat VBA sub for copy and "paste values" on multiple rows

VBA to remove commas in a cell and paste the cell values in different rows