Function Alphabetize(SHEET as Worksheet, Argument, First_Row, Data_Column)
Prog = "Alphabetize"
LastRow = Last_Row(SHEET)
If LastRow < First_Row Then
Alphabetize = First_Row
SHEET.Cells(First_Row, Data_Column) = Argument
Else
For Row = First_Row To LastRow
To_test = SHEET.Cells(Row, Data_Column)
If To_test = Argument Then
Alphabetize = Row
ElseIf To_test > Argument Then
Call Data_Insert_Rows(SHEET, Row, Row)
SHEET.Cells(Row, Data_Column) = Argument
End If
Next Row
SHEET.Cells(Row, Data_Column) = Argument
End If
End Function
Prog = "Data_Insert"
Row2 = Row2_or_All_or_Minus_1
Col2 = Col2_or_ALL_or_Minus_1
If Row2 = -1 Or Row2 = "All" Then Row2 = Last_Row(SHEET, Col2)
If Col2 = -1 Or Col2 = "All" Then Col2 = Last_Col(SHEET, Col2)
If Row2 >= Row1 And Col2 >= Col1 Then
RangeStr = Make_Range(Row1, Col1, Row2, Col2, SHEET)
Select Case Insert_Arg
Case it_Up
SHEET.Range(RangeStr).Insert Shift:=xlShift_Up
Case dsd_Shift_Left
SHEET.Range(RangeStr).Insert Shift:=xlShiftToLeft
Case dsd_Entire_Row
SHEET.Range(RangeStr).EntireRow.Insert
Case dsd_Entire_Column
SHEET.Range(RangeStr).EntireColumn.Insert
End Select
Else
End If
End Sub
Sub Data_Insert_Rows(SHEET as Worksheet, Row_Start, _
Optional Row_End_or_ALL_or_Minus_1 = "")
Row_End = Row_End_or_ALL_or_Minus_1
If Row_End = "" Then Row_End = Row_Start
Call Data_Insert(SHEET, Row_Start, 1, Row_End, -1, it_Entire_Row)
End Sub