Skip to content

Instantly share code, notes, and snippets.

@JakenHerman
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JakenHerman/f60edbb9d63bb305996a to your computer and use it in GitHub Desktop.
Save JakenHerman/f60edbb9d63bb305996a to your computer and use it in GitHub Desktop.
SRIPREL CLEAN
Sub SRIPREL_Clean()
'
' SRIPREL_Clean Macro
'
' Keyboard Shortcut: Ctrl+m
'
Columns("C:K").Select
Range("C3").Activate
Selection.Delete Shift:=xlToLeft
Range("C3").Select
ActiveCell.FormulaR1C1 = "Last Name"
Range("D3").Select
ActiveCell.FormulaR1C1 = "First Name"
Range("E3").Select
ActiveCell.FormulaR1C1 = "Middle Name Exclusion"
Range("A3:F3").Select
Selection.Style = "Check Cell"
Columns("B:B").EntireColumn.AutoFit
Columns("A:A").EntireColumn.AutoFit
Columns("C:C").EntireColumn.AutoFit
Columns("D:D").EntireColumn.AutoFit
Columns("E:E").EntireColumn.AutoFit
Columns("F:F").EntireColumn.AutoFit
Range("A1:F1").Select
With Selection
.HorizontalAlignment = xlGeneral
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Selection.UnMerge
With Selection
.HorizontalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Merge
Selection.Style = "Title"
Rows("2:2").Select
Selection.Delete Shift:=xlUp
Range("C3").Select
Windows( _
"ST_Student_Information_041 - Incomplete Admissions Requirements (5).xlsx"). _
Activate
Range("C26").Select
ActiveWindow.SmallScroll Down:=-45
Range("C3").Select
ActiveCell.FormulaR1C1 = ""
ActiveWindow.SmallScroll Down:=3
Windows ("ST_Student_Information_041 - Incomplete Admissions Requirements (5).xlsx")
.Activate
ActiveWindow.SmallScroll Down:=-12
Windows( _
"ST_Student_Information_041 - Incomplete Admissions Requirements (5).xlsx"). _
Activate
ActiveWindow.SmallScroll Down:=-15
Range("C4").Select
Windows("ST_Student_Information_041 - Incomplete Admissions Requirements.xlsx") _
.Activate
ActiveCell.FormulaR1C1 = "=LEFT(RC[-2],(FIND("","",R[1]C[-2],1)-1))"
Range("C3").Select
ActiveCell.FormulaR1C1 = "=LEFT(RC[-2],(FIND("","",RC[-2],1)-1))"
Range("C3").Select
Selection.AutoFill Destination:=Range("C3:C40"), Type:=xlFillCopy
Range("C3:C40").Select
ActiveWindow.SmallScroll Down:=-15
Columns("C:C").EntireColumn.AutoFit
Range("D3").Select
Windows( _
"ST_Student_Information_041 - Incomplete Admissions Requirements (5).xlsx"). _
Activate
Range("D3").Select
Windows("ST_Student_Information_041 - Incomplete Admissions Requirements.xlsx") _
.Activate
ActiveCell.FormulaR1C1 = "=MID(RC[-3],FIND("","",RC[-3])+2,256)"
Range("D3").Select
Selection.AutoFill Destination:=Range("D3:D40"), Type:=xlFillCopy
Range("D3:D40").Select
Columns("D:D").EntireColumn.AutoFit
Rows("1:1").RowHeight = 37.5
Range("A1:F1").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Columns("F:F").ColumnWidth = 19.14
Range("F2").Select
ActiveCell.FormulaR1C1 = "P. ID"
Range("E3").Select
Windows( _
"ST_Student_Information_041 - Incomplete Admissions Requirements (5).xlsx"). _
Activate
Range("E3").Select
Windows("ST_Student_Information_041 - Incomplete Admissions Requirements.xlsx") _
.Activate
ActiveCell.FormulaR1C1 = "=LEFT(RC[-1],FIND("""",RC[-1],1)-1)"
Range("E3").Select
Selection.AutoFill Destination:=Range("E3:E7"), Type:=xlFillCopy
Range("E3:E7").Select
Range("E4").Select
ActiveCell.FormulaR1C1 = "=LEFT(RC[-1],FIND("""",RC[-1],1)-1)"
Range("E4").Select
ActiveCell.FormulaR1C1 = "=LEFT(RC[-1], FIND("" "", RC[-1], 1) -1 )"
Range("E4").Select
Selection.AutoFill Destination:=Range("E4:E40"), Type:=xlFillCopy
Range("E4:E40").Select
ActiveWindow.SmallScroll Down:=-9
Range("E3").Select
ActiveCell.FormulaR1C1 = "=LEFT(RC[-1],FIND("" "",RC[-1],1)-1)"
Range("E4").Select
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment