Hopy
New Member
- Joined
- Aug 4, 2022
- Messages
- 8
- Office Version
- 365
- 2021
- 2019
- 2016
- 2013
- 2011
- 2010
- Platform
- Windows
- Mobile
- Web
Hello every one.
I have a code, who copied data range from input table to another tabs based on A row vales.
code who make this copy:
But this code keep input table cell formatting, how to modify this code to copy only cell values, and except cell formatting?
Whole code:
I have a code, who copied data range from input table to another tabs based on A row vales.
code who make this copy:
VBA Code:
With Sheet1.[A1].CurrentRegion
.Value = .Value
.AutoFilter 1, ar(x), 7
.Offset(1).Resize(.Rows.Count - 1).Copy Sheets(ar(x)).Range("A" & Rows.Count).End(3)(2)
.AutoFilter
Application.CutCopyMode = False
End With
But this code keep input table cell formatting, how to modify this code to copy only cell values, and except cell formatting?
Whole code:
VBA Code:
Set DataRange = Sheet1.Range("X1:X" & Sheet1.Cells(1, 23).Value)
For Each Cell In DataRange.Cells
MyString = MyString & ";|;" & Cell.Value
Next Cell
MyString = Right(MyString, Len(MyString) - 3)
ar = Split(MyString, ";|;")
For x = LBound(ar) To UBound(ar)
With Sheet1.[A1].CurrentRegion
.Value = .Value
.AutoFilter 1, ar(x), 7
.Offset(1).Resize(.Rows.Count - 1).Copy Sheets(ar(x)).Range("A" & Rows.Count).End(3)(2)
.AutoFilter
Application.CutCopyMode = False
End With
Application.ScreenUpdating = False
Next x