Hello experts, 
I have an problem with the code below. As you can see in the xls. I use userform, and this part I can not solve.
What I need is written in the code below. (Sum,find, copy to cells) For more understanding, open the xls or ask me here in the thread. Also see the userform i use.
Thaks you guys.
Its fine if can just make one month, then I will make the remaining. :d
Userform.JPG
ServiceDriftMaaling - Lidt data.xls
Option Explicit
Sub Jan()
Dim Last As Variant, i As Variant
Sheets(TheWord).Select
Last = Cells(Rows.Count, "A").End(xlUp).Row
For i = Last To 1 Step -1
If (Cells(i, "E").Value) = "Afsluttet" And (Cells(i, "C").Value) = "ServiceER" Then
'Sum all in col I and col J.
' Then find TheWord in sheet "Overview".
'Copy the 2 sums to the right cell under Jan
End If
Next i
'Next row with new contents
For i = Last To 1 Step -1
If (Cells(i, "E").Value) = "Igangværende" And (Cells(i, "C").Value) = "ServiceER" Then
'Sum all in col I and col J.
' Then find TheWord in sheet "Overview".
'Copy the 2 sums to the right cell under Jan
End If
Next i
'Next row with new contents
For i = Last To 1 Step -1
If (Cells(i, "E").Value) = "Igangværende" And (Cells(i, "C").Value) = "EntreFP" Then
'Sum all in col I and col J.
' Then find TheWord in sheet "Overview".
'Copy the 2 sums to the right cell under Jan'
End If
Next i
'etc
End Sub
Sub Feb()
Dim Last As Variant, i As Variant
Sheets(TheWord).Select
Last = Cells(Rows.Count, "A").End(xlUp).Row
For i = Last To 1 Step -1
If (Cells(i, "E").Value) = "Afsluttet" And (Cells(i, "C").Value) = "ServiceER" Then
'Sum all in col I and col J.
' Then find TheWord in sheet "Overview".
'Copy the 2 sums to the right cell under Feb
End If
Next i
End Sub
Bookmarks