Created
December 21, 2011 21:01
-
-
Save conzett/1507685 to your computer and use it in GitHub Desktop.
ISSI APAK to Microsoft Dynamics GP GL Import conversion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Remove1() | |
With ActiveSheet | |
.AutoFilterMode = False | |
With Range("a1", Range("a" & Rows.Count).End(xlUp)) | |
.AutoFilter 1, "Source:*" | |
On Error Resume Next | |
.Offset(1).SpecialCells(12).EntireRow.Delete | |
End With | |
.AutoFilterMode = False | |
End With | |
End Sub | |
Sub Remove2() | |
With ActiveSheet | |
.AutoFilterMode = False | |
With Range("o1", Range("o" & Rows.Count).End(xlUp)) | |
.AutoFilter 1, "Source Total:*" | |
On Error Resume Next | |
.Offset(1).SpecialCells(12).EntireRow.Delete | |
End With | |
.AutoFilterMode = False | |
End With | |
End Sub | |
Sub Remove3() | |
With ActiveSheet | |
.AutoFilterMode = False | |
With Range("o1", Range("o" & Rows.Count).End(xlUp)) | |
.AutoFilter 1, "Account Total:*" | |
On Error Resume Next | |
.Offset(1).SpecialCells(12).EntireRow.Delete | |
End With | |
.AutoFilterMode = False | |
End With | |
End Sub | |
Sub FillBlanks() | |
Dim LastRow As Long | |
Dim strBlankAddress As String | |
Dim rngSearch As Range | |
On Error GoTo BlankNotFound | |
LastRow = ((Range("A" & Rows.Count).End(xlUp).Row) + 1) | |
Set rngSearch = Range("A2:A" & LastRow) | |
strBlankAddress = rngSearch.Find(What:="", After:=Range("A2")).Address | |
Range(strBlankAddress) = Left(Range(strBlankAddress).Offset(-1, 0), 25) | |
Do | |
strBlankAddress = rngSearch.FindNext(After:=Range(strBlankAddress)).Address | |
Range(strBlankAddress) = Left(Range(strBlankAddress).Offset(-1, 0), 25) | |
Loop | |
BlankNotFound: | |
Set rngSearch = Nothing | |
Err.Clear | |
On Error GoTo 0 | |
End Sub | |
Sub Remove4() | |
With ActiveSheet | |
.AutoFilterMode = False | |
With Range("o1", Range("o" & Rows.Count).End(xlUp)) | |
.AutoFilter 1, "" | |
On Error Resume Next | |
.Offset(1).SpecialCells(12).EntireRow.Delete | |
End With | |
.AutoFilterMode = False | |
End With | |
End Sub | |
Sub Reformat() | |
Columns("D:D").Select | |
Application.CutCopyMode = False | |
Selection.Cut | |
Columns("A:A").Select | |
Selection.Insert Shift:=xlToRight | |
Range("A1").Select | |
ActiveCell.FormulaR1C1 = "Batch" | |
Range("B1").Select | |
ActiveCell.FormulaR1C1 = "Account" | |
Columns("C:C").Select | |
Selection.Delete Shift:=xlToLeft | |
Columns("D:D").Select | |
Selection.Delete Shift:=xlToLeft | |
Columns("C:C").Select | |
Selection.Delete Shift:=xlToLeft | |
Selection.Delete Shift:=xlToLeft | |
Selection.Delete Shift:=xlToLeft | |
Selection.Delete Shift:=xlToLeft | |
Selection.Delete Shift:=xlToLeft | |
Selection.Delete Shift:=xlToLeft | |
Range("C1").Select | |
ActiveCell.FormulaR1C1 = "Distribution Reference" | |
Columns("D:I").Select | |
Selection.Delete Shift:=xlToLeft | |
Columns("E:F").Select | |
Selection.Delete Shift:=xlToLeft | |
Columns("D:D").Select | |
Selection.Cut | |
Columns("C:C").Select | |
Selection.Insert Shift:=xlToRight | |
Columns("C:C").Select | |
Selection.NumberFormat = "$#,##0.00_);[Red]($#,##0.00)" | |
End Sub | |
Sub RUNME() | |
Remove1 | |
Remove2 | |
Remove3 | |
FillBlanks | |
Remove4 | |
Reformat | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment