Results 1 to 2 of 2

[Challenging] - Need Sum, find, and copy to cells

Threaded View

  1. #1
    Registered User
    Join Date
    04-12-2013
    Location
    Denmark
    MS-Off Ver
    Excel 2007
    Posts
    9

    Lightbulb [Challenging] - Need Sum, find, and copy to cells

    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
    Last edited by kamuk000; 04-19-2013 at 04:32 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1