Hi all,
I use the following code:
Sub bvlasdflkas()
cellerSomSkalFylles = 45269
cellerSomSkalSøkesGjennom = 17752
ScreenUpdating = False
'ScreenUpdating = False
For f = 2 To cellerSomSkalFylles
DAGEN = 0
For i = 4 To cellerSomSkalSøkesGjennom
With Worksheets("No of shares")
If .Cells(i, 3).Text = Worksheets("Test").Cells(f, 4).Text And .Cells(i, 4).Text <= Worksheets("Test").Cells(f, 1).Text Then
If .Cells(i, 4).Value >= DAGEN Then
Worksheets("Test").Cells(f, 7).Value = .Cells(i, 5).Value
DAGEN = .Cells(i, 4).Value
'MsgBox "BALLE"
End If
End If
End With
Next
'MsgBox "pung"
Next
ScreenUpdating = True
End Sub
It works, but it would take about a week to let it run through:p
I am no expert in writing codes, and would be most greatful if somecould could assist me in rewriting it into a more efficient code
Gnoke
Bookmarks