How to make a auto counter to print pages

0 votes

The first macro that sorts it needs a reference in a cell that goes based on account number, which we have as F01 0001 to F01 2000 then F02 all the way to F14. Is there a way to make the cell go F01 0001 then sort then print then go F01 0002 automatically and loop the processes until it's done? I have two macros, one to sort the excel sheet by account number and one to print the page and put a pdf in a folder.

Sub Automake()
    For Each r In Range("E8")
        r.Value = r.Value + 1
        run filter e by e:8
        run produceinv
    Next r
End Sub
Jan 19 in Others by Kithuzzz
• 27,740 points
34 views

1 answer to this question.

0 votes

This will loop through all of those account numbers:

Option Explicit
Sub Filter_And_Sum()

    Dim lPrefix As Long
    Dim lCount As Long
    Dim Account_Number As String
    
    For lPrefix = 1 To 14
        For lCount = 1 To 2000
            Account_Number = "F" & Format(lPrefix, "00") & " " & Format(lCount, "0000")
            Debug.Print Account_Number
            
            ' Do something ...
            
        Next lCount
    Next lPrefix
    
End Sub
answered Jan 19 by narikkadan
• 51,240 points

Related Questions In Others

0 votes
1 answer

How to make a countdown timer in Android?

package com.example.countdowntimer; import java.util.concurrent.TimeUnit; import android.app.Activity; import android.os.Bundle; import android.os.CountDownTimer; import android.widget.TextView; public ...READ MORE

answered Jun 1, 2022 in Others by nisha
• 2,190 points
784 views
0 votes
1 answer

How to print the next row every time a function runs? (openpyxl)

Verify the indentation. I executed the sample ...READ MORE

answered Jan 7 in Others by narikkadan
• 51,240 points
62 views
0 votes
1 answer

What is a name function in JavaScript & how to define it?

A named function declares a name as ...READ MORE

answered Mar 7, 2019 in Others by Frankie
• 9,830 points
2,181 views
0 votes
1 answer
0 votes
1 answer

Generate VCards from Excel using VBA

Solution  Create a class called CContact with getters ...READ MORE

answered Nov 21, 2022 in Others by narikkadan
• 51,240 points
55 views
0 votes
1 answer

VBA Loop To Import Changing File Names

You can use a FOR loop and ...READ MORE

answered Jan 12 in Others by narikkadan
• 51,240 points
44 views
0 votes
1 answer

Is there a hierarchy inferring algorithm available in python?

Convert the list of values to the ...READ MORE

answered Jan 15 in Others by narikkadan
• 51,240 points
38 views
0 votes
1 answer

Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

answered Sep 5, 2018 in Blockchain by digger
• 26,740 points
522 views
0 votes
1 answer

How to make Component Variant in Google Optimize A/B testing in Next js

Render all the components in ReactJs after ...READ MORE

answered Feb 18, 2022 in Others by narikkadan
• 51,240 points
541 views
0 votes
1 answer

Excel VBA : HOW TO PRINT THE TEXT IN A CELL (like Wrap Text)

Use a LineFeed character to create a ...READ MORE

answered Oct 27, 2022 in Others by narikkadan
• 51,240 points
172 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP