fbpx
Search
Close this search box.

All articles in 'VBA Macros' Category

Update Report Filters using simple macro – a Dynamic Pivot Chart Example

Published on Apr 27, 2011 in Charts and Graphs, Pivot Tables & Charts, VBA Macros
Update Report Filters using simple macro – a Dynamic Pivot Chart Example

Last week, we have learned what Pivot Table Report Filters are & how to use them.

Today, I am going to show, how you can use simple macro code to change the report filter value dynamically.

We will learn how to create the chart shown here.

Continue »

Are You Ready for Online VBA Classes? I need your help!

Published on Apr 18, 2011 in personal, VBA Macros
Are You Ready for Online VBA Classes? I need your help!

Many of you have emailed and asked me, “Chandoo, can you help us learn VBA too? Just like you do with Excel.”

Well, as flattering as those requests were, the fact is, I was lousy at VBA. Well, I used to be very good at Visual Basic, back in the college days. But my programming skills have rusted over the years as I did very little coding. I guess, I have become a business-guy. So it took me time to re-learn VBA. And now, I am happy to announce that We are ready to start our very first batch of VBA Class.

But, before we start, I need some help from you. I want to know what is it that you want to learn, so that we can design the course curriculum & methodology around your needs.

So please take a few minutes and complete this survey:

click here to the survey.

Continue »

Celebrating India’s Worldcup Cricket Victory – In Excel Dashboard Style!

Celebrating India’s Worldcup Cricket Victory – In Excel Dashboard Style!

I know I am late to the party, but better late than…, uh! forget it.

As the keen readers of our blog knew, I like cricket and I show my enthusiasm by making an excel dashboard (or info-graphic) whenever Indian team reaches a major milestone. So naturally, I was super excited when we won the ICC World cup 2011. Last time Indian won the event was in 1983 and my idea of a dashboard at that time was a bottle of milk and jingo-bell, my favorite shake-to-make-annoying-noise toy. I think our latest world-cup victory deserves something more than that. So here we go.

Continue »

Show Details On-demand in Excel [Tutorial + Training Program]

Published on Apr 7, 2011 in Charts and Graphs, products, VBA Macros
Show Details On-demand in Excel [Tutorial + Training Program]

Yesterday, we have seen a beautiful example of how showing details (like distribution) on-demand can increase the effectiveness of your reports. Today, we will learn how to do the same in Excel.

Continue »

Convert ISERROR formulas to IFERROR formulas [macro]

Published on Mar 14, 2011 in VBA Macros
Convert ISERROR formulas to IFERROR formulas [macro]

Last Friday, we have learned about an interesting formula – IFERROR Formula using which you can easily handle errors in Excel workbooks.

Quite a few people reading that page asked, “Wow, this is good. But how can I take a sheet full of =IF(ISERROR(…)….) formulas and convert them to =IFERROR()”

There is a different set of folks who asked “Wow, this is good. But quite a few of my colleagues use Excel 2003 and they see a bunch of #NAME errors when I send them an excel workbook with IFERROR formulas. Any help?!?”

I am pleased to announce that I wrote 2 simple macros, iferror2iserror() and iserror2iferror() that would scan formulas in a bunch of selected cells and convert them from IFERROR to ISERROR and vice-a-versa.

Continue »

Get Rid of Page Break Lines with a snap [macros]

Published on Feb 28, 2011 in VBA Macros
Get Rid of Page Break Lines with a snap [macros]

Have you ever jumped back to normal view from print preview and noticed the annoying page break lines? They look distracting. They are like a naughty kid shouting for attention. look at me!!! How do we get rid of those lines after completing our business with print preview?!? Very simple. We just copy everything, press […]

Continue »

Merge Cells without Losing Data [Quick Tip]

Published on Dec 7, 2010 in Learn Excel, VBA Macros
Merge Cells without Losing Data [Quick Tip]

Many of us face this problem. We have some data in a few cells. Either for alignment or structure, we would like to merge the cell contents in to one big cell. But Excel wont help as it cannot merge values from all cells.

Continue »

Displaying & Selecting a Scenario using VBA [Modeling in Excel]

Published on Sep 24, 2010 in Financial Modeling, VBA Macros
Displaying & Selecting a Scenario using VBA [Modeling in Excel]

If you are building financial models or any other type of excel based decision models, chances are, there will be multiple scenarios in your model. Whenever you have multiple scenarios, you may want an easy, intuitive way to select one of them. In this post, I will present an interesting scenario display & selection technique that I received by email from our reader Itay Maor.

Continue »

9 Excel Tips & Downloads Submitted by Our Readers [Reader Awesomeness Week]

Published on Aug 9, 2010 in Charts and Graphs, Excel Howtos, Learn Excel, VBA Macros
9 Excel Tips & Downloads Submitted by Our Readers [Reader Awesomeness Week]

Last week I announced Reader Awesomeness Week to celebrate the passion, attitude and knowledge of our little community here. I got 9 interesting and beautiful entries from our readers. In this post you can see 9 tips & downloads submitted by our readers. These include a project management template, a macro to remove blanks, a technique to make Google Earth maps using Excel and several other interesting tips & tricks.

Go ahead and read them, download attached workbooks and become awesome in Excel. 🙂

Continue »

Select Expressions to Find their Values [Macro Debugging Tip]

Published on Jul 19, 2010 in VBA Macros
Select Expressions to Find their Values [Macro Debugging Tip]

Here is a quick macro tip that I stumbled on to while debugging some code yesterday (ya, ya, call me workaholic for coding on a weekend…) You can select expressions in your code and place mouse pointer on that for a second to find what value it evaluates to (of course, this works only on […]

Continue »

How to Add your Macros to QAT or Excel toolbars?

Published on Jun 8, 2010 in Excel Howtos, VBA Macros
How to Add your Macros to QAT or Excel toolbars?

Ok, so you have written a shiny new macro to solve all the problems. The macro, solveWorldProblemsAndMakeSomeCoffee() sits nicely in your personalmacros.xlam file somewhere in C drive. You have also installed the macro as an add-in so that it is always available. But wait!!! How do you run your sWPAMSC everyday in the morning? (ok, […]

Continue »

Get Stock Quotes using Excel Macros [and a Crash Course in VBA]

Published on Jun 2, 2010 in Learn Excel, VBA Macros
Get Stock Quotes using Excel Macros [and a Crash Course in VBA]

Have you ever wanted to fetch live stock quotes from excel? In this post we will learn about how to get stock quotes for specified symbols using macros. We use Yahoo! Finance API to fetch the stock quotes and other information related to a company using excel macros. Along the way, we will also learn various interesting things about Excel VBA. Think of this post as a crash course in VBA.

This is a guest post by Daniel Ferry.

Continue »

Dynamic Dashboard in Excel – Pulling it all together [Part 4 of 4]

Published on May 26, 2010 in Charts and Graphs, VBA Macros
Dynamic Dashboard in Excel – Pulling it all together [Part 4 of 4]

In the last installment of our dynamic dashboard tutorial, we will take all that we have learned in first 3 parts and combine that to create a final dashboard. We are going to use concepts like table of contents, macros and data validation to help us get ahead. You can find the entire macro and downloadable workbook inside the post. Read on…

Continue »

Making a Dynamic Dashboard in Excel [Part 3 of 4]

Published on Apr 22, 2010 in Charts and Graphs, VBA Macros
Making a Dynamic Dashboard in Excel [Part 3 of 4]

In this post we are going to look at a simple example of the VBA behind the Dynamic Dashboard. Essentially we will learn to write macros for doing this. Read the rest of this post to find code samples and downloadable files to play with.

Continue »

Solve Sudoku Puzzles using Excel [because it is weekend]

Published on Oct 23, 2009 in VBA Macros
Solve Sudoku Puzzles using Excel [because it is weekend]

Sanjay, my colleague is an avid programmer and excel enthusiast. In his spare time he wrote a small VBA macro to solve Sudoku. Sudoku is a very famous number based puzzle with a 9×9 grid of cells. Each of the 9 rows, columns and 3×3 blocks should be filled in such a way that they have all the numbers from 1 to 9. Sudoku is a very effective way to keep your brain cells ticking. I am a huge sudoku fan and I solve sudoku whenever I have few minutes to kill. So naturally I jumped with joy when I saw Sanjay’s excel macro for solving sudoku. He is kind enough to let me share this with all of you.

Continue »