Consulting

Results 1 to 3 of 3

Thread: Test

  1. #1
    VBAX Regular
    Joined
    Oct 2011
    Posts
    15
    Location

    Test

    [VBA]test test test test test [/VBA]

  2. #2
    VBAX Regular
    Joined
    Oct 2011
    Posts
    15
    Location
    [VBA]'Recounting the Rows and Columns
    RowCount = Cells(1, 1).CurrentRegion.Rows.Count
    ColumnCount = Cells(1, 1).CurrentRegion.Columns.Count

    'Create Weekly schedule Report
    For k = 1 To RowCount
    Worksheets("Weekly schedule Report").Cells(k + 1, 1) = Cells(k, 3)
    Worksheets("Weekly schedule Report").Cells(k + 1, 2) = Cells(k, 2)
    Worksheets("Weekly schedule Report").Cells(k + 1, 3) = Cells(k, 4)
    Worksheets("Weekly schedule Report").Cells(k + 1, 4) = Cells(k, 1)


    Set rng = Range(Cells(k, 1), Cells(k, 1).End(xlToRight))
    NumberBreaks = WorksheetFunction.CountIf(rng, "Short Break")
    Shiftstart = WorksheetFunction.Min(rng)
    ShiftEnd = Cells(k, 6)

    Worksheets("Weekly schedule Report").Cells(k + 1, 5) = Shiftstart

    For l = 7 To ColumnCount
    If NumberBreaks = 2 Then
    If Cells(k, l) = "Short Break" Then
    If Worksheets("Weekly schedule Report").Cells(k + 1, 6) = "" Then
    Worksheets("Weekly schedule Report").Cells(k + 1, 6) = Cells(k, l - 2)
    Else
    Worksheets("Weekly schedule Report").Cells(k + 1, 8) = Cells(k, l - 2)
    End If
    End If
    ElseIf NumberBreaks = 1 Then
    Worksheets("Weekly schedule Report").Cells(k + 1, 6) = Cells(k, l - 2)
    End If

    If Cells(k, l) = "Lunch" Then
    Worksheets("Weekly schedule Report").Cells(k + 1, 7) = Cells(k, l - 2)
    End If

    Next l

    For z = 7 To ColumnCount Step 3

    If Cells(k, z - 1) > ShiftEnd Then
    ShiftEnd = Cells(k, z - 1)
    End If
    Worksheets("Weekly schedule Report").Cells(k + 1, 9) = ShiftEnd
    Next z

    Next k[/VBA]

  3. #3
    test test test test test

Posting Permissions

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