Copy the values to another sheet without formatting

sofas

Active Member
Joined
Sep 11, 2022
Messages
468
Office Version
  1. 2019
Platform
  1. Windows
Welcome . How do I copy values without formats

VBA Code:
Public Sub drewhx15()
    Dim Rng As Range
    
    With ThisWorkbook.Worksheets("feuil1")
        Set Rng = .Range("a5:d" & .Cells(.Rows.Count, "A").End(xlUp).Row)
    End With
    With Rng
        .AutoFilter Field:=2, Criteria1:="ok"
        .Offset(1, 1).Resize(.Rows.Count - 1, .Columns.Count - 1).Copy ThisWorkbook.Worksheets("Sh").Range("a12")
        .AutoFilter Field:=2, Criteria1:="yes"
        .Offset(1, 1).Resize(.Rows.Count - 1, .Columns.Count - 1).Copy ThisWorkbook.Worksheets("Sh").Range("e12")
        .Parent.AutoFilterMode = False
    End With
End Sub
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
And copy the new data down the old when copying again
 
Upvote 0
Unsure as to where you want to paste your code, but if you want to paste something without formatting you can try something like

VBA Code:
Sub Sofas()
Dim Rng As Range

Set Rng = Range("A1:B11")

With Rng.Copy
Range("D1").PasteSpecial xlPasteValues
End With
End Sub

Book14
ABCDE
1SofasSofas
2SofasSofas
3SofasSofas
4SofasSofas
5SofasSofas
6SofasSofas
7SofasSofas
8SofasSofas
9SofasSofas
10SofasSofas
11SofasSofas
Sheet1


Book14
ABCDE
1SofasSofasSofasSofas
2SofasSofasSofasSofas
3SofasSofasSofasSofas
4SofasSofasSofasSofas
5SofasSofasSofasSofas
6SofasSofasSofasSofas
7SofasSofasSofasSofas
8SofasSofasSofasSofas
9SofasSofasSofasSofas
10SofasSofasSofasSofas
11SofasSofasSofasSofas
Sheet1
 
Upvote 0
Unsure as to where you want to paste your code, but if you want to paste something without formatting you can try something like

VBA Code:
Sub Sofas()
Dim Rng As Range

Set Rng = Range("A1:B11")

With Rng.Copy
Range("D1").PasteSpecial xlPasteValues
End With
End Sub

Book14
ABCDE
1SofasSofas
2SofasSofas
3SofasSofas
4SofasSofas
5SofasSofas
6SofasSofas
7SofasSofas
8SofasSofas
9SofasSofas
10SofasSofas
11SofasSofas
Sheet1


Book14
ABCDE
1SofasSofasSofasSofas
2SofasSofasSofasSofas
3SofasSofasSofasSofas
4SofasSofasSofasSofas
5SofasSofasSofasSofas
6SofasSofasSofasSofas
7SofasSofasSofasSofas
8SofasSofasSofasSofas
9SofasSofasSofasSofas
10SofasSofasSofasSofas
11SofasSofasSofasSofas
Sheet1
Thank you for your interest, because I want to filter the data and copy it under each other
 
Upvote 0
There is a another very similar question that was asked today that shows various options:
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,448
Members
448,966
Latest member
DannyC96

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