Wednesday 5 December 2012

Week 8 - 05 Dec 2012 - Wed

36th day at SSMC.

Today, I was editing a macro programming that is used for updating the charts in the excel file. This particular macro was created to retrieve data from another 3 spreadsheets and the data retrieved includes the defect type, defect count and the ppm according to a given week.

The original macro takes 15 sec to complete its job. So I had tried to reduce the waiting time or even, if possible, replace with formula.

The original macro had the following steps:

1. Copy defect type
2. Match week no.
3. Copy defect count and ppm of the matched week no.
4. Sort defect type according to the largest count and ppm
5. Keep top 8 defect types and delete the rest

What I have in mind and hope to achieve is to reduce the waiting time, so the steps are shorter.

1. Match week no.
2. Sort defect type according to the largest count and ppm of the matched week no.
3. Copy only top 8 defect types and their count and ppm.

However, things doesn't goes smoothly like we always thought they would be. It is not easy to write the macro programming language even though I am just editing from one. I kept having errors when compiling and I did not know how to resolve them.

As a result, like always, whenever I'm stuck at one thing and couldn't solve it after trying for quite awhile, I will move on to another issue.

And I really want to thank my friend, Ting Min, this time. During lunch time, she told me to relax when I was feeling vexed and said that I will always solve something in the end of the day.

Haha. I don't know why but I really managed to solve another problem that I had left off last week. I was so happy. (^^)

I was having problem last week on the macro that extracts data from a text file (.TXT) and insert into excel. It also automatically insert new column of data. Today, I had managed to improve the macro programming on the way it extract and insert data into excel and also replace the part where it insert new columns of data with formula. So, the overall execution time of the macro is shortened

The whole of today had past slowly but at least I had achieved something before the end of today. It's some kind of encouragement? (^^)

No comments:

Post a Comment