Sub DBAready()
' DBAready Macro
Application.ScreenUpdating = False
Application.CutCopyMode = False
Columns("A:B").Select
Selection.delete Shift:=xlToLeft
Columns("B:E").Select
Selection.delete Shift:=xlToLeft
Columns("C:S").Select
Selection.delete Shift:=xlToLeft
Columns("B:B").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("A:A").Select
Selection.Replace What:=", ", Replacement:=",", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False ', FormulaVersion:=xlReplaceFormula
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=True, Space:=False, Other:=True, OtherChar:= _
"(", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1)), _
TrailingMinusNumbers:=True
Columns("C:C").Select
Selection.delete Shift:=xlToLeft
Columns("B:B").Select
Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False ', FormulaVersion:=xlReplaceFormula2
Range("C2").Select
ActiveCell.FormulaR1C1 = "=PROPER(RC[-1])"
Range("C2").Select
Selection.AutoFill Destination:=Range("C2:C200"), Type:=xlFillDefault
Range("A1").Value = "Last Name"
Range("B1").Value = "First Name"
Range("C1").Value = "First Proper"
Range("E1").Value = "Today's date"
Range("F1").Value = "Days since LAS"
Range("G1").Value = "Next 3"
Range("H1").Value = "Next 1"
Range("I1").Value = "Text to send"
Range("J1").Value = "Text formula"
Range("I1").Font.Bold = True
Range("E2").Formula = "=TODAY()"
Range("E2").Select
Selection.AutoFill Destination:=Range("E2:E200"), Type:=xlFillDefault
Range("F2").FormulaR1C1 = "=DAYS(RC[-1],RC[-2])"
Range("F2").Select
Selection.AutoFill Destination:=Range("F2:F200"), Type:=xlFillDefault
Range("G2").Select
Columns("G:G").ColumnWidth = 27.33
ActiveCell.FormulaR1C1 = _
"=INDEX(NextThree!C[-3],MATCH(1,(NextThree!C[-5]=RC[-6])*(NextThree!C[-4]=RC[-4]),0))"
Range("G2").Select
Selection.AutoFill Destination:=Range("G2:G200"), Type:=xlFillDefault
Range("H2").Select
ActiveCell.FormulaR1C1 = _
"=INDEX(NextThree!C[-3],MATCH(1,(NextThree!C[-6]=RC[-7])*(NextThree!C[-5]=RC[-5]),0))"
Range("H2").Select
Selection.AutoFill Destination:=Range("H2:H200"), Type:=xlFillDefault
With Range("J2:J" & Range("H" & Rows.Count).End(3).Row)
.Formula = "=SEARCH(""DBA"",H2)"
.Value = .Value
On Error Resume Next
.SpecialCells(xlCellTypeConstants, xlErrors).EntireRow.delete
.Value = ""
End With
Columns("A:C").ColumnWidth = 11.56
Columns("D:E").ColumnWidth = 11.33
Columns("F:F").ColumnWidth = 11.33
Columns("H:H").ColumnWidth = 11.89
Columns("I:I").ColumnWidth = 96.33
Columns("D:D").ColumnWidth = 16.89
Rows("1:1").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub