Send Snippet To: Save this snippet to Code Collector Pro -- view all surfrgeek's snippets
language: Other
license: Other

Code for Snippet:

Option Explicit
Sub One()
ActiveWorkbook.Worksheets("Employee Scores").Range ("A1")
    With .Font
        Size = 14
        Bold = True
End Sub
Sub Two()
ActiveWorkbook.Worksheets("Employee Scores").Range("A3:F3").Font.Bold = True
ActiveWorkbook.Worksheets("Employee Scores").Range("A3:F3").Font.Italic = True
ActiveWorkbook.Worksheets("Employee Scores").Range("A3:F3").HorizontalAlignment = xlRight
End Sub
Sub Three()
ActiveWorkbook.Worksheets("Employee Scores").Range("A4:A21").Font.ColorIndex = 5
End Sub
Sub Four()
ActiveWorkbook.Worksheets("Employee Scores").Range("B4:F21").Interior.ColorIndex = 6
End Sub
Sub Five()
Range("A22").Value = "Averages"
ActiveCell.Font.Bold = True
End Sub
Sub Six()
Range("B22").Formula = "=AVERAGE(B4:B21)"
Range("B22").Copy Destination:=Range("C22:F22")
End Sub
Sub Sixb()
Range("B22:F22").NumberFormat = "0.0;-0.0;;"
End Sub
Sub Seven()
ActiveCell.Offset(2, 0).Select
End Sub
Sub Eight()
ActiveCell.Offset(23, 9).Select
ActiveCell.Value = "1"
End Sub
Sub Nine()
Range("B4:F21").Name = "EmployeeScoreData"
End Sub
Sub Ten()
ActiveCell.Offset(4, 3).Select
End Sub
Sub Eleven()
End Sub
Sub Twelve()
End Sub
Sub Thirteen()
With Range("A4")
        Range(.Offset(0, 0), .End(xlDown)).Name = "EmployeeNumbers"
End With
End Sub
Sub Thirteenb()
Selection.Resize(Selection.Rows.Count - 1, _
End Sub
Sub Fourteen()
Dim totalScore As Integer
With Range("C10")
        Range(.Offset(-6, -1), .End(xlDown).End(xlToRight)).Name = "ScoreData"
    End With
Selection.Resize(Selection.Rows.Count - 1, _
totalScore = ("=SUM(Worksheets("Employee Scores").Range("ScoreData")")
'MsgBox "Grand Total of Scores: " & totalScore & " distinct areas.", _
            vbInformation , "Number of areas"
End Sub
Sub Fifteen()
ActiveCell.Offset(2, 3).Select
MsgBox ActiveCell.Value
End Sub
Sub Sixteen()
Dim fnd As String
Dim myrange As Range
Dim lastCell As Range
Dim foundCell As Range
Dim rng As Range
Set myrange = ActiveSheet.UsedRange
Set lastCell = myrange.Cells(myrange.Cells.Count)
Set foundCell = myrange.Find(what:=fnd, after:=lastCell)
MsgBox "Total Number of data: " & fnd
End Sub
comments powered by Disqus


Link to this snippet:

Download to Code Collector

To use the direct link to your snippet on either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 7
Date Added: 2017-09-06 16:35:30
Last Modified: 2017-09-09 14:05:31

Web Analytics