Hello Everyone,

I am new at VBA and would like to know if my below requirement can be achievable.

Need to create a sheet based on inputs from Master sheet in a specific format. i am finding it difficult as requires Array and Loop

Input File:
Data Structure of Master worksheet is as follows;

1. Column A - Order Number
2. Column B - ID
3. Column C - Ref 1
4. Column D - Ref 2
5. Column E - Ref 3
6. Column F - Ref 4
7. Column G - Ref 5

Background - A single Order can have multiple rows depending on of count of same Order number (Column A). Based on it count, the macro should create new worksheet which should capture data in following manner.

Output file;

For Each order there are two segments,Namely;
1. ORD (Order)
2. DET (Detail)

Structure of ORD is given below;

Column A (Row 1) - "ORD" (fixed value for each Order Number)
Column B (Row 1) - Update Fixed Value "DUE"
Column C (Row 1) - Order Number from Master(Column A)
Column D (Row 1) - Ref 1 from Master(Column C)
Column E (Row 1) - Update Fixed Value "DUE"
Column F (Row 1) - Update "Current date" in YYMMDD format
Column G (Row 1) - Update "Current date + 1" in YYMMDD format
Column H (Row 1) - ID from Master(Column B)

Structure of DET is given below;
Here there will be multiple DET entries depending on how many entries are there for each Order Number in Master Sheet

Column A (Row 2) - "DET" (fixed value for each Order Number)
Column B (Row 2) - Has to be Running number based on number of order Number
Column C (Row 2) - Ref 2 from Master(Column D)
Column D (Row 2) - Ref 3 from Master(Column E)
Column E (Row 2) - Ref 5 from Master(Column G)
Column F (Row 2) - Ref 5 from Master(Column G)
Column G (Row 2) - BLANK
Column H (Row 2) - BLANK

Will be great help if you can help me here.