Excel formulas acting slow? Today lets talk about optimizing & speeding up Excel formulas. Use these tips & ideas to super-charge your sluggish workbook. Use the best practices & formula guidelines described in this post to optimize your complex worksheet models & make them faster.

10 Tips to Optimize & Speed up Excel Formulas
1. Use tables to hold the data

Starting Excel 2007 you can keep all the related data in a table. For example call center data in our recent dashboard is kept in a table. Tables can be used in formulas with structural references, can be used as a source for pivot tables etc. And since tables grow & shrink as you add / remove data, none of your formulas need to be dynamic. As an example, if you have table called cs, then the formula sum(cs[column_name]) refers to sum of all values in the column_name of table cs. Even if you add more data to CS, the formula still works.
Resources to learn about Excel Tables:
- Introduction to Excel Tables – what are they and how to use them?
- Example: Customer Service Dashboard – Data & Calculations
2. Use named ranges, named formulas
By using names and named formulas, you can simplify your spreadsheet. Not only that, since named ranges & named formulas can hold arrays (ie lists of values), you can hold intermediate results or values that you need to refer many times in these named formulas. This will reduce the formula overhead and makes your workbooks faster.
Resources to learn about named ranges & named formulas:
- Excel School Program: In this comprehensive course, I talk about how to think about and write better formulas for data analysis work.
- Musings on Live Calendar [Excel Hero]
- Examples of Named Formulas – 2023 Calendar in Excel
3. Use Dynamic Arrays & Spill Ranges
Introduced in Excel 365, Dynamic Arrays allow us to build complex calculations with ease. I suggest incorporating new functions like:
- FILTER to fetch a list of values that meet one or more criteria.
- SORT to sort the values
- UNIQUE to eliminate duplicate values on the fly
- XLOOKUP to perform various lookups
- VSTACK / HSTACK to combine datasets
- TOCOL / TOROW to convert tables of data to single row or column formats
- # or Spill operator to manage spill ranges
Learn more about Dynamic Array functions here:
- Dynamic Array Functions – A deep introduction
- Dynamic Array Functions – how to use them [Video]
- How to use XLOOKUP
4. Use Pivot Tables
Many times, even when we do not need formulas we use them, because we can. Pivot tables are an excellent way to calculate a lot of summary values with few clicks. Once the pivot is built, you can refer to the pivot values with GETPIVOTDATA or simple cell references. This will reduce a lot of unnecessary calculations. If you are changing the data, you can just go to DATA ribbon and refresh all pivots in one go. This process works smoothly when you use tables to hold the data.
One of the reasons for slow workbooks is lot of data. Since, pivot tables are designed to work with lots of data, by using them, you can speed up your workbooks.
Resources to learn Pivot Tables:
5. Sort your data
One of the reasons for sluggish performance is that you are searching for something in a lot of un-sorted data. You are making Excel look for a needle in a hay-stack. Many times we inherit un-sorted data thru data imports. By sorting the data & using correct operators in lookup formulas, we can instantly speedup a sluggish workbook. If you feel that sorting the data is a pain, you can even automate it with Power Query or a sort procedure (thru a simple VBA macro).
Examples on Sorting:
- Remove duplicates & sort a list using Pivot Tables
- Use Power Query to pre-sort the data you are working with
6. Use Manual Calculation Mode
Speed is the hefty price you pay for complexity. But many times, we want our Excel workbooks to be complex, because only then they would reflect real world. In such cases, you can set formula calculations to manual mode.

Just press F9 whenever you want to run the formulas. Please note that Excel runs formulas whenever you save the file too.
7. Use Non-volatile formulas
There are a class of formulas in excel called as volatile formulas. These formulas are re-calculated whenever there is a change in the workbook. Examples of volatile formulas are RAND, NOW, TODAY, OFFSET etc. So when your worksheet has a lot of volatile formulas, any time you make a change all these formulas must be re-calculated. Thus, your worksheet becomes slow.
Solution? Simple, do not use volatile formulas. For example, instead of using OFFSET to construct a dynamic range, you can use INDEX. Since INDEX is non-volatile, it tends to be faster. Or better still, use a table.
Resources to learn more:
8. Keep formulas in a separate sheet
Formulas are the driving force behind any Excel workbook or model. By keeping all them in a separate worksheet(s), you minimize the chance of mistakes, omissions or repetitions. Debugging or investigating slow performance becomes an easy task when all formulas are in same place. I usually keep all the formulas in one sheet whenever I am designing a dashboard or complex workbook. This structure also helps me in thinking thru various calculations and planning the formulas in a structured way.
9. Write better formulas
Here are some guidelines that I follow when writing formulas.
- Built-in formulas tend to better than your own version – for example SUMIFS is easier to write and just as fast as SUMPRODUCT.
- Do not refer to entire column when you need just a few values. Do not write SUM(A:A), when you know values are only in A1:A10.
- IFERROR instead of lengthy IF(ISERROR formulas. Use IFERROR to simplify your error checking.
- Remove or Fix formula errors [how to, findout why formulas are not working]
- Use newer Dynamic Array formulas instead of old clunky array formulas
- Remove or Reduce references to other workbooks. Use Power Query instead.
- Remove any named ranges that result in error or missing links.
- Try to come up with alternative formulas: this not only sharpens your mind, but lets you discover better solutions.
- Do not calculate something if you do not need it.
- Do not calculate same thing twice. Use the first result second time too. Use LET for accomplishing this.
Resources to write better formulas:
- Introduction to SUMIFS formula
- Introduction to XLOOKUP formula
- How to use the new Dynamic Array functions in Excel
- Introduction to SUMPRODUCT formula
- Introduction to IFERROR formula
- Excel Formula Forensics
- Excel School program
10. Desperate times need desperate measures
Sometimes, no matter what you do, the workbook remains slow. Here are a few whacky ideas that I try in such cases:
- Replace formulas with values. I take a backup of the formulas. Then I select everything, CTRL+C, ALT+ESV (or CTRL Shift V). Done!
- Develop the workbook from scratch: Sometimes it helps to design the workbook afresh.
- Replace external data links with actual data: And import data by copy-pasting if needed.
- Reduce the functionality: See if the end user can live with fewer features in the workbook.
- Find an alternative solution: Trying to do everything in Excel is foolish. See if there is any external tool that can do this better & faster.
BONUS: Learn new formulas & play with them
Optimization is not a one-shot exercise. It is an ongoing-business. So you need to constantly learn new formulas, new uses & play with them. This way, you see new ways to improve a sluggish workbook. To begin with, explore our Formula homework & formula forensics pages and see how you solve these problems.
How do you speed-up your Excel formulas?
So how do you optimize & speed-up your Excel formulas? What techniques do you use? Please share using comments.













12 Responses to “Speeding up & Optimizing Excel – Tips for Charting & Formatting [Speedy Spreadsheet Week]”
Usually when I dump data into my files to update values, the formatting sometimes go to all rows or columns. So what I typically will do is go to the last row and then the last column and use Ctrl + Shift + end and then delete the cells highlighted. this will remove all unknown formats in the worksheet. Also, after you have done this, you won't see the benefit until you save the document. Sometimes I even have to close and reopen. The direct sign that this has improved is the size of the scroll bar and range.
I have some comments on a couple of the points.
1. Camera objects
Tip: I use defined names in conjunction with camera tool objects.
Each camera object gets a name like so:
CameraItem01
Referring to: =IF(PicsOn=1,Sheet1!$C$2:$S$5,"")
By setting the PicsOn name to 1, the camera objects become "live", by setting the PicsOn name to 0, they become static. That improves performance enormously.
4: Conditional formatting
Lots of CF rules can slow down your workbook a lot. And it does not show the calc progress a "normal" recalc does on slow workbooks.
5. Format whole columns/rows
as far as I know, there is no problem with formatting entire columns/rows performance-wise, on the contrary, Excel is more efficient when you format an entire column than when you format a couple of 100 rows of a column.
6. Styles.
Here I wholeheartedly disagree. I say: Use styles. And use them religously.
I mean: if you have applied a (custom) style and you need to change a small piece of formatting to make that one cell look right, force yourself to create a new style just for that cell. It forces you to really think about your spreadsheet design and try and streamline it. It also makes it much, much easier to change your sheet's appearance later on. See http://www.jkp-ads.com/articles/styles00.asp
Very good insights Jan..
Camera objects: I often use similar technique to turn off images in my dashboards.
Formats: Thanks for clearing this. Do you think formatting larger ranges has any impact on macro speeds or it does not matter?
Styles: Thanks for telling us about this. As I mentioned, I am not sure about the styles, but I am under the impressions that excessive use of styles can bloat the file size.
@Chandoo:
If you stick to formatting entire rows/columns I don't expect macro speed is affected. Better: try it!
If you use styles properly AND as a replacement of ad-hoc cell formatting, I expect you'll see that the file actually is smaller in size.
This is because the cells now only have a reference to a single style instead of a reference to a custom cell formatting style.
Many cell formatting combinations get created if you format your cells in an ad-hoc manner, which was responsible for the dreaded "Too many different cell formats" error in Excel 2003 and older. Excel 2007 and 2010 have a higher limit there, but it does slow down your file with many of them.
Style bloat in my point of view is what you get by copying and pasting a lot from various other files and thus get Normal 1, Normal 1 1, Normal 1 1 1, ... I have seen workbooks with as many as 6000 styles, all caused by copying and pasting from various differently formatted workbooks.
Excel 2007 and 2010 have fixed a number of issues regarding copying of styles, but for workbooks with a long editing history, the trouble is already in the workbooks.
Cant emphasise the importance of reducing the amount of formatting in a workbook - this has a suprising impact on workbook size. I've always kept to one font, and no more than three colours - this has worked well for me. Keeping things clean and simple should be the motto when designing any type of report/dashboard that is going to be distributed around the organisation.
You can also save a few MB's by saving as an xlsb file.
Has anyone else mentioned that only the first item in the "more ..." section is hyperlinked.
Prem, have you confirmed by trial that XLSB file size is smaller than same XLSX file? Sorry, I just tried it with a small, simple XLSM file. I was surprised to see you are correct. File went from 40kb to 37kb. I thought that the compression of the new file would make the new file smaller.
@Ron
All Excel files have a minimum overhead that they have to include which is around 8KB, just to store a simple number or letter.
So with a small file of 40KB you will not see a huge improvement in file size
With files greater than 10MB you will see large improvements in size.
The compression gained also depends on what the contents of the file include. That is straight numbers, text and formulas can be greatly compressed whereas files that contain a lot of objects especially pictures gain very little from using *.xlsb files.
@Ron.. the other articles are yet to be published. All the links will be updated by Tuesday (27th March).
Hi,
I have a need for x,y scatter chart to have arround 30 data series.
like this:
http://i65.tinypic.com/jra8lc.jpg
Also I have multiple of such charts in one excel file.
Is there any way to make excel faster, because it is irritatingly slow?
(though my PC config. is quite on the level)
Thanks in advance!!!
@Mil
30 series won't be the issue
It is the number of points in the series
Also remove all fancy modifications, like shadows, fancy fills etc
I'd suggest asking the question in the Chandoo.org Forums http://forum.chandoo.org/
Attach a sample file with an example of what you are after
@Hui
I've already removed all fancy mod. The problem is there are also a lot of data points in one series.
Thanks for the advice!
@Mil
Do you really need every data point ?
Where is the chart being presented Screen or Report
On a screen you are unlikely to use more than 800 pixels for the chart area
So using any more than about 250 points is not adding values
On an A4 chart in landscape lets say the chart area is 6" long and at 300dpi that is 2000 pixels
Once again using more than 800-1000 points will not add any value
I have seen charts with 30,000+ points and when this is explained and a work around shown people appreciate the speed up
For a work around try setting up an area where you select say every x'th point using an Offset or Index Function
Then plot that data
I'd suggest asking the question in the Chandoo.org Forums http://forum.chandoo.org/
Attach a sample file with an example of what you are after