Pages

Search This Blog

Friday, 22 August 2014

How to transpose an array using VBA

One of the topics I was looking for in Google was a simple code to transpose an array, (swapping dimensions, rows with columns and that sort), and I didn't find a simple example to do so, so here is the first code I though might worth to share with you guys, Here is the function, I am passing the array I want to transpose into TransPoseRange Function

Thursday, 21 August 2014

New Starter to VBA

If you are a new starter in VBA programming I have to say you need to plan your programming before start writing down any code. Obviously what matters is to write down a set of procedures and functions just to facilitate your day to day Microsoft Excel calculation and analysis. But it would be beneficial to plan your coding in a way that you'll to be able to reuse your functions and procedures in different excel workbook with minimum adjustment to your code. Therefore it would be best to think and plan out what your procedure suppose to do to generate a set of results or execute a set of procedures regardless of the position of your input data. I've been suggesting everyone who asks for my help to broke down your code into smaller functions and procedures and recall them when you need. That would help to pass the input data as scope variables and hence increase the flexibility of your code. so FUNCTIONS!! FUNCTIONS!! FUNCTIONS!! plan out your code and break it down in to FUNCTIONS.