Friday, January 22, 2010

Excel macro. Multiple range formula quick input

Sometime you need to build a formula which should refer to many sheets and many ranges. Like =SUM(Sheet1!E:K;Sheet2!A:B;Sheet3!D:C)
To do this you need to type =SUM( then select sheet, select range, type ;, select n-th sheet again, select range.... Yeah thats boring !
I wrote an Excel Add-In to automate this task partialy:



What you need to do:
1. Place rangeformula.xla somewhere in My Documents and install it with double-click. 



2. Switch between sheets and select ranges you want to include to formula. Selection will be saved per sheet.
3. In Excel 97/2k/2k3 use menu Utilities->Range Formula to open input form of add-in (look picture). In Excel 2007 Utilities submenu will be installed under Add-Ins menu.
4. Enter Function name e.g. SUM or COUNTBLANK without brackets and equal sign


5. Select ranges in list which you want to include into formula
6. Copy/Paste Result formula.

Have fun !

No comments:

Post a Comment