+ Reply to Thread
Results 1 to 3 of 3

Keeping track of used vacation hours

Hybrid View

  1. #1
    Registered User
    Join Date
    09-25-2007
    Posts
    11

    Keeping track of used vacation hours

    I had a Yahoo toolbar that was blocking popups. What an ordeal.

    I have a spreadsheet that I use for keeping track of my vacation hours used at work. I am trying to get it to work automatically. I have been trying by using a vlookup, but I can't get the data to list the way I need it. I have attached a .zip file with an abbreviated portion of what I am trying to do. Maybe someone here could get this thing to work.

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    lose the empty column & the merged cells then use a PivotTable

    http://www.excel-it.com/pivot_tables.htm
    Attached Files Attached Files
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Fast Forward,

    These macros have been added to the attached workbook.

    Standard Module
    Sub CompileVacationHours()
    
      Dim LastRow As Long
      Dim N As Long, R As Long
      
        LastRow = Cells(Rows.Count, "B").End(xlUp).Row
          If LastRow < 6 Then LastRow = 6
        N = 6
        
        Range(Cells(6, "I"), Cells(LastRow, "L")).ClearContents
        
          For R = 6 To LastRow
            If Cells(R, "D") <> "" Then
               Range(Cells(N, "I"), Cells(N, "L")).Value = Range(Cells(R, "B"), Cells(R, "E")).Value
               N = N + 1
            End If
          Next R
               
    End Sub
    Worksheet Sheet1 Change Event
    Private Sub Worksheet_Change(ByVal Target As Range)
    
      Dim EntryRng As Range
      Dim LastRow As Long
      
        Application.EnableEvents = False
        
          LastRow = Cells(Rows.Count, "B").End(xlUp).Row
          Set EntryRng = Range(Cells(6, "B"), Cells(LastRow, "E"))
        
            If Not Intersect(Target, EntryRng) Is Nothing Then
               Call CompileVacationHours
            End If
            
        Application.EnableEvents = True
        
    End Sub
    Sincerely,
    Leith Ross
    Attached Files Attached Files

+ Reply to Thread

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