So, think your hot stuff.
Im needing to search through the attached document which is truck logs at a mine and use vba to search through the list for each of the different shovels eg SHVL1, SHVL2 & SHVL3, and when the code finds that string, to display the tonnage 2 colums back from it. Im about half way there a i think but am having trouble with strings, if it was numbers i could do it no problem
I have the idea in my head but need a genius to help me with the fine print
Heres what i have so far (that doesn't work) but it gives an idea of what i want
Hopefully someone konws what to do here..or has done it before![]()
Sub trucks() Dim a(1000) As String tonsum = 0 For i = 1 To 548 a(i) = Cells(i + 1, 7).Value If a(i) = "SHVL1" Then Range(i + 1, 5).Select tonsum = tonsum + ActiveCell End If Cells(1, 9).Value = tonsum Next i End Sub
Thanks
Dan
Bookmarks