Programing my printer in excel ?

Hi guys, i would like to ask how to set the value for " i " in excel 2003 to print only the even numbers, as it is now it prints horizontally from 1 to 20 and vertically from 1 to 200 and i want the value of " i " to print only the even numbers from 1 to 20 so 2;4;6;8; and so on, is that possible ? Thank's in advance, i really need this one !

Sub PrintAndIncrement()

    'get values

    Dim stepcount As Integer

    stepcount = Range("C3").Value

    Dim stepsize As Integer

    stepsize = Range("C4").Value

    Dim doprint As Boolean

    doprint = False

    If Range("C5").Value = "yes" Then doprint = True

    'change sheet

    Sheets("Sheet1").Select

    Dim i, j, step As Integer

    'repeat

    For step = 1 To stepcount

        'scan fields

        For i = 1 To 20

            For j = 1 To 200

                If Cells(j, i).Value <> "" Then

                    Cells(j, i).Value = Cells(j, i).Value + stepsize

                End If

            Next j

        Next i

        'print if necessary

        If doprint Then ActiveWindow.SelectedSheets.PrintOut

    Next step

End Sub

There are no answers yet.
Be the first to answer this question.