Learning VBA in 2 weeks.
How to Learn VBA programming
Just get your hands dirty and do it. As long as you know how coding works, it should be easy. Make some simply exercises for yourself. Start off by recording marcos of what you are doing and seeing what the code looks like. Then learn logical operators (if then else etc) and how to use these to make decisions. Then learn how to use loops (suggest picking 1 loop method - "for" is easiest, the rest are all the same). A couple good exercises:
- Use Monte-Carlo to price an option
- Sort sheets in a workbook in alphabetical order (google it for the solution, many ways to do it)
- Create a function that returns the "rank" of a number in a set of number
- Create a function that takes arguments SheetName and RangeName and returns the value of that range on that sheet (pretty useful if you don't like to use indirect function)
- Macro to color all cells in selection a certain color if they don't have a formula/don't have a number/are blank/have precedents/have dependents (the last 2 are pretty tough actually)
And so forth. Think of fun things to do and just do it. Maybe create something that allows you to price binary or asian options using monte-carlo (pretty simple). Just get to it - stop thinking about how to best approach it - the answer is head first.
Here's an intro video for VBA:
Recommended Reading
You're in luck, I was basically in the exact same situation as you, having to learn those exact two languages. I did a good amount of research and here's what I would recommend. Firstly, you should spread out the learning over the next few months rather than condense it into 2 weeks since your internship starts in the summer. If you cram everything now, you'll likely forget most of it by the time you start work.
1) Get this book: http://www.amazon.ca/Head-First-C-Andrew-Stellman/dp/0596514824
It's far superior to many of the other C# texts out there which are mostly reference texts. You build more and more knowledge as you go through each chapter in the book. It teaches you C# AND OOP. It has copious amounts of exercises to reinforce learning all over the book. It even has 3 labs which progress in difficulty, with the final lab requiring you to build a fully functional Space Invaders game in C#. It's more engaging than any of the other dry programming books you can get out there. Get this book, read 30 pages a day and do all the exercises, and you'll be in good shape when you finish the 800 pages (or if you insist on cramming, do 100-150 pages a day). I would highly recommend looking for some trading related projects to do after you've completed the book.
2) Get http://www.amazon.ca/Excel-2010-Power-Programming-VBA/dp/0470475358
Unlike the other book, just reading this one probably won't do you much good. I recommend you ask the other forum members here to give you some projects to do (related to trading, options, etc.), while you try to apply the techniques from the book as much as you can. You could read the book from front to back, but I don't think you'll retain much unless you're actually building stuff and applying the new concepts as you move along. The book does come with a CD with plenty of examples.
And if you really want to be efficient in learning, think about things in terms of what your end goals are. Your end goals are to be able to develop useful programs for the traders. So find out what they'll want you to build. Then try to build whatever that stuff is. But if you think about your other end-goal, which is leaving a good impression on the traders, you'll probably want to develop the full foundation of knowledge so you'll more likely be able to exceed their expectations and add value with your abilities.
I would say that the most common mistake people make in learning VBA is in thinking about how to do it for way too long. Just get your hands dirty and do it. As long as you know how coding works, it should be easy. Make some simply exercises for yourself. Start off by recording marcos of what you are doing and seeing what the code looks like. Then learn logical operators (if then else etc) and how to use these to make decisions. Then learn how to use loops (suggest picking 1 loop method - "for" is easiest, the rest are all the same). A couple good exercises: 1. Use Monte-Carlo to price an option 2. Sort sheets in a workbook in alphabetical order (google it for the solution, many ways to do it) 3. Create a function that returns the "rank" of a number in a set of numbers 4. Create a function that takes arguments SheetName and RangeName and returns the value of that range on that sheet (pretty useful if you don't like to use indirect function) 5. Macro to color all cells in selection a certain color if they don't have a formula/don't have a number/are blank/have precedents/have dependents (the last 2 are pretty tough actually)
And so forth. Think of fun things to do and just do it. Maybe create something that allows you to price binary or asian options using monte-carlo (pretty simple). Just get to it - stop thinking about how to best approach it - the answer is head first.
Thanks a lot for that insightful response, swordfish! You've presented some excellent pointers that I certainly need to consider. I've just downloaded an ebook copy of the Excel Power Programming book and I'll download or perhaps buy the Head First C# book. I also noticed that you posted ".ca" Amazon links- I'm actually from Canada as well.
Gotta agree with the "dive in, then think" approach, Dr. Joe. I just wanted to ensure that I'm doing things as efficiently as possible. Thanks a lot for the outline and exercise suggestions, they will certainly come in handy.
Et et et provident. Odio illo recusandae sed culpa mollitia sapiente sint. Enim itaque minima distinctio aut voluptatem blanditiis assumenda adipisci. Consectetur sint qui totam optio.
Quidem maiores in nihil qui saepe et. Velit a velit esse molestiae. Nemo qui accusamus illum iure vel. Vel est non non. Quis facilis voluptate dolores quia esse eos aut.
See All Comments - 100% Free
WSO depends on everyone being able to pitch in when they know something. Unlock with your email and get bonus: 6 financial modeling lessons free ($199 value)
or Unlock with your social account...