I think I will have to give up. I have no idea what I am looking at, making my eyes go blurry. Someone can look at this code and tell me exactly what I need, I look at it and all I see is gibberish.
I've tried debugging best I can, I am an amateur at this, but I can't seem to fathom it out. A certain line of code is telling it to scan the txt file, find a value and display it. I need it to find one more value and add it to the first. How I can do this alludes me. I've stepped into the code...
I did try the get external data, but it would take me a long time to do all 500 files. With the above code, it works on all files in about 5 seconds. The problem is as I have said, the code is slightly wrong and not pulling the correct data.
Sub test()
Dim myDir As String, fn As String, txt As String
Dim myMax As Double, myName As String, myLoc As String, n As Long
Dim myMatch As Object, x, y, temp As String, i As Long, ii As Long
myDir = ThisWorkbook.Path & "\"
fn = Dir(myDir & "*.txt")
If fn <> ""...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.