• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Extract Multiple Rows into a Limited Template based on Multiple Criterias

albertd

New Member
Dear All,

I understand that this might be a long process, So I thought we can take it solve the intentions one by one and I would keep on editing the post :)

I have a data dump that I want to extract into a template and be printed out.

Here are my intentions:

1. From the data dump (sample above), is it possible to automatically extract the appropriate value into the Template with a maximum of 10 rows for each set of Template.
Each template would be either limited daily OR maximum of 10 transactions as long as they are from the same credit source.

2. Values for the templates are:
3. Credit Source = Source + Source Name
4. Total = All values inside the voucher
5. Account = Item Code
6. Detail = Item Name
7. Unit Code = Unit Code
8. Value = Total Debit

9. As the datadump is extensive, is it possible to have ~10 sets of template in 1 Sheet and once they are printed out individually, they are deleted?

10. And Finally, to colour code for those that have been extracted to the template


Since I am new to VBA, I would have no issue with the inputs to their appropriate places and to colour code. But I am still learning about the loop function that I believe would be required for this?

Any help would be much appreciated!
 

Attachments

  • Capture.PNG
    Capture.PNG
    18 KB · Views: 3
  • Final.PNG
    Final.PNG
    45 KB · Views: 3
  • Initial.PNG
    Initial.PNG
    38.7 KB · Views: 3
  • Sample.xlsm
    15.1 KB · Views: 3
Hi all,

To provide better clarity, I have attached the Before and After that I did manually.
 

Attachments

  • After Voucher.xlsx
    12 KB · Views: 2
  • After.xlsm
    14.3 KB · Views: 2
  • Before.xlsm
    14.2 KB · Views: 1
Dear All,

I understand that this might be a long process, So I thought we can take it solve the intentions one by one and I would keep on editing the post :)

I have a data dump that I want to extract into a template and be printed out.

Here are my intentions:

1. From the data dump (sample above), is it possible to automatically extract the appropriate value into the Template with a maximum of 10 rows for each set of Template.
Each template would be either limited daily OR maximum of 10 transactions as long as they are from the same credit source.

2. Values for the templates are:
3. Credit Source = Source + Source Name
4. Total = All values inside the voucher
5. Account = Item Code
6. Detail = Item Name
7. Unit Code = Unit Code
8. Value = Total Debit

9. As the datadump is extensive, is it possible to have ~10 sets of template in 1 Sheet and once they are printed out individually, they are deleted?

10. And Finally, to colour code for those that have been extracted to the template


Since I am new to VBA, I would have no issue with the inputs to their appropriate places and to colour code. But I am still learning about the loop function that I believe would be required for this?

Any help would be much appreciated!


Purpose Clarification:

I have a data dump that I want to extract into a template and be printed out.

Here are my intentions:

From the data dump (sample above), is it possible to automatically extract the appropriate value into the Template with a maximum of 10 rows for each set of Template. And then colour-code those that have been printed to the Template.
These are the Template (Payment Voucher) limitations:

a. Each template contains the data from only 1 (one) day

If in 1st January 2020 & 2nd January 2020, there are 5 transactions /day, there would have to be 2 Templates (1 for each day).

b. Each Template should only be from 1 Source

So if in 1st January 2020 & 2nd January 2020, there are 5 transactions/day from each Source A & B, there would be 4 Templates (1 for each source/day).

c. Each template could only contain 10 lines.

So if in 1st January 2020 & 2nd January 2020, there are 11 transactions/day from each Source A & B, there would be 8 Templates (2 for each source/day).


2. Values for the templates are:
- Credit Source = Source + Source Name
- Total = All values inside the voucher
- Account = Item Code
- Detail = Item Name
- Unit Code = Unit Code
- Value = Total Debit
 
Please include links to your (many) cross-posts. Simply spamming a request across all forums w/o letting the respective members know is considered rude.
 
albertd
Please, reread Forum Rules:
Why to close/delete this? Follow rules as there has written.
 
Back
Top