I need to modify a current macro to print only if sales > 0. I have tried a few modifications use if, next, etc. with no luck.
Current Macro:
Sub PSL()
'
' PSL Macro
' Macro recorded 2/6/2012 by wcast
'
'
Sheets("DATA").Select
Range("B12").Select
Dim x As Long, y As Long
Dim q As Integer
x = ActiveCell.Row
y = ActiveCell.Column
Sheets("DATA").Select
Range("A11").Select
x = 11
y = 1
Do While x < Range("r96")
Selection.Copy
Sheets("LETTER").Select
Range("e4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.Run "TM1RECALC"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
x = x + 1
Sheets("DATA").Select
Cells(x, y).Select
Loop
Sheets("DATA").Select
Range("A11").Select
Selection.Copy
Sheets("LETTER").Select
Range("e4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.Run "TM1RECALC"
End Sub
Portion of DATA sheet:
Any assistance would be appreciated.
Current Macro:
Sub PSL()
'
' PSL Macro
' Macro recorded 2/6/2012 by wcast
'
'
Sheets("DATA").Select
Range("B12").Select
Dim x As Long, y As Long
Dim q As Integer
x = ActiveCell.Row
y = ActiveCell.Column
Sheets("DATA").Select
Range("A11").Select
x = 11
y = 1
Do While x < Range("r96")
Selection.Copy
Sheets("LETTER").Select
Range("e4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.Run "TM1RECALC"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
x = x + 1
Sheets("DATA").Select
Cells(x, y).Select
Loop
Sheets("DATA").Select
Range("A11").Select
Selection.Copy
Sheets("LETTER").Select
Range("e4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.Run "TM1RECALC"
End Sub
Portion of DATA sheet:
Any assistance would be appreciated.