To explain the macro-enabled working in a file

PRADEEPB270

New member
Joined
Oct 25, 2012
Messages
3
Reaction score
0
Points
0
Location
GURGAON-INDIA
Excel Version(s)
2013
A person has sent to me a file which is macro-enabled file.Can anybody help me to understand the file step-by-step that how has he worked out in this file?I am unable to self understand the working of that file.
For more clarification,please refer the attach file.


Regards
 

Attachments

  • 1234.xlsm
    18.7 KB · Views: 14
It simply reformats the data from multiple lines per part number, and spits it out to a new worksheet with part number on one line, all of its suppliers in adjacent columns.
 
I want to know the working steps involved in this file.Can you explain me in details of the steps by steps working?

Thanks in advance.
 
It creates a dictionary object and adds each Part Code to that dictionary. As it processes each Part it checks if it is in the dictionary, if not, it adds it and its supplier, if it does it just appends the supplier to that dictionary part item.

Then it dumps the dictionary items into an array, loops the array and splits each element into its component parts and loops through those dropping them all into a single row.

The last loop can be done in a single statement, without the loop.
 
Back
Top