Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Friday, January 4, 2013

Haprak

So, let me just share something about my first VBA project in MS Excel 2010.

I have a database of Preventive Planned Maintenance (PPM) activities saved in Excel worksheets. The PPMs are organized in a roster, where each PPM takes one row of the worksheet. For each PPM, there is a list of equipment stored in one cell, and manhours stored in a few cells along with other information.

Here's a screenshot of the original data:


I want the equipment list to be separated into individual cells in a new row with its PPM data copied, and the manhours divided per equipment.

Basically, this is the result that I want:


Before I share my codes, how would you do it?

Erm... I'm asking like someone actually read my blog... but who knows...

Thursday, January 3, 2013

Gaya

I cant believe I only made one entry in 2012. Ha ha.

2012 was a rather tough year. After five years in HR, I finally moved out and became a maintenance system 'expert user' (a clueless 'expert' actually), and by default required to lead my division in a Group-wide system migration project which was finally rolled out a couple of days ago.

At the same time I was struggling with post-surgery sciatica and back pain which resulted in me to undergo one major surgery to screw two flexible metal support on my lumbar spine earlier last year, then a minor surgical procedure to 'clean-up' the area around the implant, just a couple of months ago.

Well, let just say due to the pain I was suffering, I was screwed, literally, as well as metaphorically.

That basically sum my 2012. Plus, I decided to go bald.

Anyway, less than a month ago I went for a training on Excel VBA Fundamental. Tired of using so many nested functions and formulas in cells to do what I want to do in Excel all this while, I decided to go for this training.

I regretted attending that training... 7 years too late. This is probably the most useful corporate-sponsored training I ever attended since I started working with this Company. I started using VBA right away after coming back from the training.

Well, for those of you out there whose job uses a lot of MS Excel, I would recommend that you go for this course, provided that you already know and used some of the more 'advance' feature of the software. If you do not know how to use the pivot table or even the vlookup function correctly, don't bother.

Actually, I wanted to share my first decent VBA 'project' in this blog so that others can comment or learn something from it but since getting back from office today, I was too occupied with house chores. The codes is not fully completed yet, although I've managed to get it to do the things I wanted it to do.

Wait, what did you say? Just copy + paste the codes?

Nope..

If one thing I learned from 2012 is this: try not to present half-cooked material to avoid you yourself from being cooked (or grilled) by your audience.

Good night.