neodjandre
Well-known Member
- Joined
- Nov 29, 2006
- Messages
- 950
- Office Version
- 2019
- Platform
- Windows
I am using this code which works fine:
The only problem I am having is when I am pasting the array at the end, some of the dates (column2 in the array) appear as text. I have to click on each cell and press enter to be converted to dates. Is there a way to paste as dates from the array?
What also puzzles me is that some entries are correctly shown as dates but most of them are text. I would also avoid looping in the array, as I have hundreds of entries and this will make things unusable.
many thanks!
Code:
Set copyrng = lo_b1.AutoFilter.Range.SpecialCells(xlCellTypeVisible)
copyrng.Copy Destination:=strng
arr = strng.CurrentRegion.Offset(1, 0)
aRws = Evaluate("Row(1:" & UBound(arr) & ")")
arr = Application.Index(arr, aRws, Array(14, 1, 6, 2, 13, 12, 18, 16, 7))
pasterange1.Resize(UBound(arr, 1), UBound(arr, 2)).Value = arr
Set copyrng = Nothing
Erase arr
Erase aRws
The only problem I am having is when I am pasting the array at the end, some of the dates (column2 in the array) appear as text. I have to click on each cell and press enter to be converted to dates. Is there a way to paste as dates from the array?
What also puzzles me is that some entries are correctly shown as dates but most of them are text. I would also avoid looping in the array, as I have hundreds of entries and this will make things unusable.
many thanks!
Last edited: