Thursday, July 29, 2010

How to record macro effectively?

Base on my experience macro recording process is simple but the most problematic is playback. Some time after playback too many errors occurred because of similarity in between workbook, worksheet or cell is not there and some time it was due to data distribution. Therefore before any recording being done you must plan ahead what is your future workbook look like for you to playback for example workbook name, sheets name and etc. Below tips is for you remember how to record macro effectively:
  1. Always begin one step behind.
    Example: If you wish to select sheet1 for every playback then before recording start you must select other sheets, same goes to range.
  2. If you use formula inside your macro then it is better to remove this formula by copy and paste value
  3. If you wish to fill certain range with formula or data use short cut key Ctrl(hold) + Enter(Followed)
  4. To select certain range in column always use short cut key Ctrl(Hold) + Shift(Hold) + arrow right(Followed)
  5. To select certain range in row always use short cut key Ctrl(Hold) + Shift(Hold) + arrow down(Followed)
  6. To select certain range for all always use short cut key Ctrl(Hold) + Shift(Hold) + End(Followed)
  7. Start and End with selecting Range A1
  8. Minimize the usage of scroll it will occupied your code for nothing
  9. Standardize sheets name
  10. Plan your recording step
Hopefully the above guide will help to minimize the playback error.
Good Luck
Click here if you have any new project! Let us create for u for free.

No comments:

Post a Comment