The quantity number mentioned in the 'Distribution!F7:F156' range of the 'Distribution' sheet should be taken from the 'CalculationDA14:DA*' range of the 'Calculation' sheet and placed in the 'CalculationDH14:DH*' range of the 'Distribution' sheet, including blank cells equal to the number specified in the Distribution!W14:W156' range of the calculation sheet, as shown in the attached file.
The detailed steps will be as follows..
Step-1:
First check the range 'Distribution!F7'; if 'non-blank' cells are found, then go to step 2. If it is blank, then check if the next cell (Distribution!F8') is 'non-blank.
In this case, it is 10
Step-2:
The number of data that should be copied from the range "Calculation! DA14:DA*" and placed in the range "Calculation!DH14:DH*" in sequence as the same as the number of data that are mentioned in the cell "Distribution!F7."
e.g
671457
672284
671458
672285
671459
672286
671461
672287
671462
672289
Step-3:
check the range 'Distribution!W7'; if 'non-blank' cells are found, then that number of blank cell should be blank in the range "Calculation!DH14:DH*" in sequence as the same as the number of data that are mentioned in the cell "'Distribution!W7'" after following Step-2.
Step-4
Thus, for the next cell, step-1 to step-3 must be followed.
This requires a VBA code. Color has been used for easy presentation of the subject, it is not necessary. I will be grateful if anyone can help me.
Bookmarks