Hello everyone
I have Sample text file (in fact I would deal with large number of text files ) >>
Manually I copy the text file data and put it into sheet then select column A (Where I put this data) >> go to Data tab >> Click "Text to Columns" and split data by comma
Then delete the first four columns and the header row...
There are four columns remaining //
After that I am using this code to have these results in specific way
Sub Test()
Dim arr As Variant
Dim p As Long
Dim w As Long
Dim x As Long
arr = Sheets("Sheet1").Range("A1:E75").Value
ReDim temp(1 To UBound(arr, 1) * UBound(arr, 2), 1 To 2)
x = 1
For p = 1 To 365
temp(p, 1) = p
Next p
For p = LBound(arr, 1) To UBound(arr, 1)
For w = LBound(arr, 2) To UBound(arr, 2)
temp(x, 2) = arr(p, w)
x = x + 1
Next w
Next p
Sheets("Sheet1").Range("J1").Resize(UBound(temp, 1), UBound(temp, 2)).Value = temp
End Sub
** I need not to deal with the excel file when manipulating data .. I just need to deal directly with the text file and do all these tasks using arrays
Mr. Karedog has helped me in similar issue .. but this is different a little
Thanks advanced for help
Bookmarks