Excel Tips, Tricks, Cheats & Hacks – Excel Ninja Edition

Share

Facebook
Twitter
LinkedIn

Last week we saw a number of Excel Tips, Tricks, Cheats & Hacks supplied by Microsoft Excel MVP’s.

This week I have invited the Chandoo.org, Excel ninjas to contribute their Excel Tips, Tricks, Cheats & Hacks.

Chandoo has Excel ninjas?
Absolutely!

Do they have swords?
No (sigh)

But you can read all about them here: Chandoo.org Excel ninjas

The Chandoo.org Excel ninjas have solved in excess of 63,000 Excel questions in the 7 years that Chandoo.org Forums have been active. Hence they are imminently qualified in all areas Excel and as such the tips and tricks they will share will be essential reading.

Lets go:

001. Find & Replace Hack No.1 – Shrivallabha

You can use CTRL+J to simulate the Enter character in “Find and Replace” or “Text to Columns” fields.

Example:
Download the sample file here: Download sample file
Cells B2:B4 contain text with multiple lines per cell
There is an invisible Enter Character in those cells that can be added via use of Ctrl+J or Alt+Enter as the data is entered

To seperate each line please follow these instructions
Select B2:B4

Nin001a
Goto the Data, Text to Columns tab

Select Delimited

Nin001b

Select Other and Type Ctrl+J in the adjacent box

Next

Nin001c

Change the Destination to D2

Nin001d
Finish

Enjoy

Nin001e

 

Contribution by: Shrivallabha

 

002. Find & Replace Hack No.2 – Shrivallabha

Using escape character ~(tilde) while replacing *(asterisk) from text in the Find and Replace box.
If someone does Find and Replace * directly then everything gets replaced as * acts as wildcard.

So you have to use ~* for replacing an asterisk * character in a string.

Contribution by: Shrivallabha

 

003. Select All – Shrivallabha

You can use the Select All Shortcut Ctrl + A to select all items listed below

  • Items in a List
  • Contiguous Cells in a Range
  • All cells in a worksheet, press Ctrl + A twice
  • All shapes, Select first shape, then press Ctrl + A

Contribution by: Shrivallabha

 

004. Apply a filter to the first row of a range – Shrivallabha

Apply a filter to the first row of a range

Select any cell in a range

ALT D + F + F (Applies filter to first row of the cells contiguous with the current cell)

Contribution by: Shrivallabha

 

005. Fill Blank cells with the value in the cell above – Asheesh

  1. Select the range that contains blank cells you need to fill.
  2. Click Home > Find & Select > Go To Special…, and a Go To Special dialog box will appear, then check Blanks option.
  3. Click OK, and all of the blank cells have been selected.
  4. Assume that the Top Left Blank cell is A3, then input the formula =A2  into active cell A3 without changing the selection.
  5. Press Ctrl + Enter, Excel will copy the respective formula to all blank cells.
  6. At this point, the filled contents are formulas, and we need to convert the formals to values.
  7. Select the whole range, copy it Ctrl + C, and then press Ctrl + Alt + V to active the Paste Special… dialog box. Then select Values option from Paste, and select None option from Operation.

Contribution by: Asheesh

 

006. Multiple Consolidation Ranges to Pivot table – Asheesh

You can use “Multiple Consolidation Ranges” of Pivot Table to generate a unique list from Multiple Sources.

Goto the worksheet where your data lists are

To achieve this you need to add the Pivot Chart Wizard to either the QAT or Tab Bar

Start the Pivot Table Wizard or use the Keyboard Shortcut ALT + D P

Select Multiple Consolidation Ranges then click Next

asheesh001

Select Create a single page field for me and Next

asheesh002

Select your data range, including a blank leading column and then click Add button.

asheesh003

Notice: As per the excel file A1:A7 is blank.The Data is in Columns B:D.

Had this not been the case then we needed to insert a new blank column at the left of the data and that is Column A in this example

Click on Finish button

You will have a table like the one in the below image in a new worksheet.

asheesh004

Now go the Pivot Table Field options and do the following

asheesh005

You should have a unique list of values

asheesh006

You can Right Click on the Grand Total and DeSelect Grand Total to remove the Grand Total if required

You can now use this list in a Named Formula, Data Validation, Chart or other use where the required Unique List is required.

 

Note: If the Source Data changes you will need to Right Click on the List and select Refresh Data

Refer to the attached file: Download Sample File

 

Hui, in his second post at Chandoo.org, actually wrote about this technique in Feb 2010 but using a Single List – Read it here

Contribution by: Asheesh

 

007. Hiding Rows that are blank – Faseeh

Hiding Rows that are blank.

I have a sheet on daily basis in which certain cells in a column are blank I want to hide the rows with those blank cells.

What I do is…

  1. Select the cell range (the column).
  2. Press F5, you will get the Go To Menu.
  3. Check the option Blank.
  4. Press Ctrl+9 to hide the selected range.

Contribution by: Faseeh

 

008. Hiding Rows that are blank – Faseeh

To use the subtotal function to get the serial number right is the one that my accounts department loves. They were tired of creating commercial invoices with serial number created by dragging manually.
Here is the procedure.

Serial Number list that do not change with Filter
Assume you want to enter serial in column A and your data is present in column B. The formula look like this: =SUBTOTAL(3,$B$4:B4)
Drag downward. (This is only one time drag). Now if you filter the list the serial number will be changed accordingly.

Contribution by: Faseeh

 

009. Slab Rate Formula – Faseeh

This is a formula for slab rate that gives total price for a quantity with given slab rate.

Slab002

So we want the price for 2,000 items

The first 1,000 will cost 0.35, the second 1,000 will cost 0.33

The total cost is found by =SUMPRODUCT((E3>=A3:A5)*(E3-A3:A5)*(B3:B5-B2:B4))

Download a sample file here: Download Sample File

Contribution by: Faseeh

 

010. Navigation tricks to get around spreadsheet faster – Luke M

Use Ctrl+Arrow key to jump to end of range.
Use Ctrl+Shift+Arrow key to select all data to end of range

Contribution by: Luke M
If you’d like to hire Luke for an Excel project, contact him at:
LukeMoraga@gmail.com

 

011. Select Visible Cells in a Filtered range – Luke M

When dealing with filtered ranges:
Use Alt+; to select visible cells only

Contribution by: Luke M
If you’d like to hire Luke for an Excel project, contact him at:
LukeMoraga@gmail.com

 

012. QAT – The Quick Access Toolbar; Shortcuts – Luke M

I’ve seen many users who don’t know about, or use the the Quick Access Toolbar (QAT) very well.
Everyone has a list of things they use often. Put these on the QAT to improve your efficiency.

My favorite thing is that all items on the QAT get auto-assigned shortcuts of Alt+[1-9].

On my system, I have Paste Values and Paste Formulas in the 2nd and 3rd slots, so I can easily do those by hitting Alt+2 or Alt+3.

Press Alt +

   1   2   3   4   5   6   7    8    9

upload_2016-4-19_10-7-48

Contribution by: Luke M
If you’d like to hire Luke for an Excel project, contact him at:
LukeMoraga@gmail.com

 

013. Keyboard Shortcuts – Marc L

Insert Current Date

Insert current date in a cell : Ctrl + ;

Insert Current Time

Insert current time in a cell : Ctrl + :

Bulk enter values or formula into several cells

To allocate same Value or Formula to several cells, Select the cells, enter the Value or Formula and

accept into all cells by Ctrl + Enter 

Date Check also known as Toggle Values/Formula Mode

Ctrl + ~ (English keyboard) or Ctrl + “ (3 on a French keyboard)

Is a toggle between displaying formulas or values in cells.
But I use it as a trick to check if dates are real dates and not text :
When displaying formulas is active, real dates appear as number,
bad dates remain as text !

This is the reason why I won all by bets against guys who insisted

Contribution by: Marc L

 

014. Break Strings into Words – Hui

A regular requirement in VBA is to be able to extract say the Name and Surnames from a string

Eg: Retrieve “Ian” & “Huitson” from “Ian David Huitson”

Hui-Shortcut1

But what if I want the Middle Name, or what if I have two middle names like my children do?

These functions quickly become very cumbersome

A technique I recently learned  simplifies this, whilst extending it to other delimiters and any number of sub-strings

You can easily parse a delimited string into an array.

You simply use the Split function with the appropriate delimiter as parameter.

The following code shows an example of using the Split function.

Hui-Shortcut2

The above code makes an array of values of size 3, Arr(0) to arr(2)

arr(0) will contain “Ian”

arr(1) will contain “David”

arr(2) will contain “Huitson”

If you are unsure of the number of array elements you should use the Ubound() function to determine the size

Ubound(arr,1) which will return the reference number of the last element = 2 in the example

in the example of my Name which has 3 elements

arr(2) = arr(Ubound(arr,1)) and each will contain the string “Huitson”

You can download both the above sample from this sample file

I picked this up a few months back from Excel Mastery, my new favorite Excel VBA site

Contribution by: Hui

 

015. Use the Camera Tool – BobHC

You can sue the Camera Tool to setup dashboards that quickly combine data from a number of worksheets into a common location

Read about its use: http://chandoo.org/wp/2008/12/02/excel-camera-tool-help/

And for fancy applications: http://www.addictivetips.com/microsoft-office/camera-tool-function-in-excel-2010/

Contribution by: BobHC

 

Closing

Many many thanks to the Chandoo.org ninjas who contributed above.

I hope you get to to revue all the tips and pass comments and appreciation back to the authors as appropriate.

Next week I have to do some real paid work and will travelling in Timor, Indonesia, but in two weeks time the Excel Tips, Tricks, Cheats & Hacks theme will continue with the Excel Tips, Tricks, Cheats & Hacks – Notable Excel Sites (non-MVP) Edition, so keep an eye out for that.

If you have any Excel Tips, Tricks, Cheats & Hacks that you would like to share with the community, please leave  a tip in the comments below.

All the user contributions will be combined into one final post: Excel Tips, Tricks, Cheats & Hacks – Users Edition

Facebook
Twitter
LinkedIn

Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Overall I learned a lot and I thought you did a great job of explaining how to do things. This will definitely elevate my reporting in the future.
Rebekah S
Reporting Analyst
Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It's all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

35 Responses to “75 Excel Speeding up Tips Shared by YOU! [Speedy Spreadsheet Week]”

  1. Jon says:

    I see most are saying that array formulas are bad. But I thought that when you use array formulas it grabs all the data at once and performs the calculations in one fell swoop. At least that is how the UDFs that I created work. When I did the time test it was much faster that way. Maybe I'll go back and check to make sure my work is right, but that's what I did.

    When I work with array formulas I get a full column of data then work on that column and return a full column of data all at once. Which has shown to be much faster than the alternative.

    Anyone have special insights on this?

  2. PremSivakanthan says:

    wow..! thats a pretty impressive list, some real gems in there. I read somewhere the other day that spreadsheet development should be 80% planning and 20% implementation - taking the time to think about layout, how you're going to calculate things and how to structure the data often results in a lot less headaches, and more time for deeper analysis...

  3. Prasad DN says:

    Hi Chandoo...

    Mixed feeling about this article, while I completely agree with you when you share everyone's points under their name giving credit to contributors, but at the same time I see alot of repeated tips and few those may not be applicable under all cases. (I may have sounded harsh). Some kind of sorting of tips were required than mere 3 categorization. (Tough ask, I know). Some really worthy and awesome tips get lost in occean.

    I would have been happy to read only non repititive tips and more like standard chandoo articles.

    Well, I have also got two tips (may get lost in the list above), which is not presented above:
    1. When using too many pivots - Disable data drilling option. This reduces file size, cache memory and speeds up file.
    2. If your macro has used too many files for gathering input, close the file and open. This is also release or kill unwanted space in memory and speeds up. Again this can be achieved by macro to close self file and reopen same file, using timer function.

    Please do not count me negative.

    Regards,
    Prasad DN

  4. Karan Kamdar says:

    Hey, one thing that really speeds up VBA processing of data is to extract ranges into arrays & then working on those arrays. Arrays are a lot faster than using cell offset or any other method for working with a database. After you are done you can also paste the value directly into the range with one single command. This will speed up the macros considerably.
    Here is a msdn article with examples in it:
    msdn.microsoft.com/en-us/library/aa139976(v=office.10).aspx

    Hope this helps

  5. John Hackwood says:

    oops, noticed a typo in the tip I posted:

    Re directly assigning values in VBA rather than copying & pasting should have read:

    Sheet2.Range( "B1:B200 ").Value= Sheet1.Range( "A1:A200 ").Value

    not
    Sheet2.Range( "B1:B200 ").Value= Sheet1.Range( "A1:A100 ").Value

  6. [...] posts on speeding up Excel worksheets, one of the posts focuses on formulas and another he let the general readers make their suggestions. I made the suggestion that people use array formulas. But most of the other suggestions said not [...]

  7. Jon says:

    OK, I tested it. My UDFs were faster as array functions (like a couple thousand times). But Excel's built in functions are faster when not doing arrays. Not sure this is the case for all situations.

  8. I can't help but to speak up.

    Deleting a PivotTable will not speed up your workbook. It will only reduce the file size. There is zero memory processing for a pivot table if it just sits there.

    Instead of destroying the pivot table, why not remove the redundant raw data. That would equally reduce the file size of the workbook, while keeping the pivot table functionality.

    http://datapigtechnologies.com/blog/index.php/cut-the-size-of-your-pivot-table-workbooks-in-half/

  9. Ranjitkumar says:

    Thanks a lot guys for your valuable tips !!

    It really worked for me

    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual

    ...
    ...
    ...
    Application.ScreenUpdating = True
    Application.Calculation = xlCalculationAutomatic 

  10. Anthony says:

    Optimizing Speed using Pivot Tables:
     
    If you find that Pivot Tables are becoming sluggish becomes of the sheer volume of tables there is a way to increase performance.  By default (xls 2010) pivot tables are designed to autofit the data within the columns as well as preserving formatting.  I discovered that unchecking these two options alone will exponentially increase performance.
     
    Here's how to do it:
     
    Right click on your pivot table(s) --->choose 'Pivot Table Options' -->Layout & Format' Tab  --->uncheck two boxes at the bottom.  Done!
     
     

  11. JoeB says:

    here is my list:
    1.    Avoid Variants when possible
    2.    Use long instead of integer
    3.    Use double instead of single
    4.    Use booleans as much as possible
    5.    pull data into arrays, manipulate, then dump back to workbook
    6.    use .value2 instead of .value if you are looking at strings or numeric values
    7.    set object variables
    dim Wks as Excel.Worksheet
    set wks = thisworkbook.Sheets("Sheet1")
    8.    use with statements...
            with wks.cells(x,y)
                .value2 = "abcd"
                .interior.colorindex=4
                with .font
                    .bold=true
                    .size =20
                    .underline=xlunderlinestylesingle
            end with
    9.    use string version of functions (Left$() instead of Left())
    10.    Test for empty string variables with len() or lenb()...if lenb(String1)=0 then
    11.    Use the Mid$() function if it is possible instead of split()
    12.    use the join$() function instead of concatenating strings
    13.    AscW() to evaluate first characters
    14.    combine if statements and booleans together
                 boolean = (lenb(String1) = 0)
    16.    InStr(), InStrB(), InStrRev() are very fast, InStr() can be used to quickly return a substring occurrence of a string
    17.    DICTIONARIES!!!!!!!!!!!
    18.    FileSystemObject
    19.    My machine runs slightly faster when i fill in all the inputs of a function (instead of InStrB(String1, "abcd"), i use (InStrB(1,String1,"abcd",vbBinaryCompare)
    20. Short Circuit If statements: If x = 2 then if y >3 then if z = 5 then b=true or
    if x=2 then
        if y >3 then
            if z=5 then
                b=true
                c=true
            end if
        end if
    end if
    21.    use ElseIf
    22.    my testing indicates ElseIf is slightly faster than a Case Select
    23.    set strings to empty by: = vbnullstring
    24.    with application
                .screenupdating = false
                .displayalerts = false
                .enableevents = false
            end with
    25.    UserForms can be very beneficial
    26.    User-Defined Types are a very neat way to encapsulate data
    27.    User-Defined Functions are handy, but can increase run-time if called thousands of times
    28.    if using ElseIfs, nested And Ifs or Select Case statements, put the argument that will occur most frequently at the beginning
    29.    Looping is not the worst thing...just got to figure out how to do it the most efficiently
    30.    Use dynamic arrays instead of static arrays
    31.    if you can figure out Win32 APIs, then they are usually much faster than VBA functions

  12. Fredrik says:

    I worked on a massive spreadsheet and it had become very slow over time as I developed it. I tried stripping down more and more formulas by replacing with pasted values, removed all conditional formatting etc. In the end what finally did the trick was when I removed the last single SUMPRODUCT fomula. It changed the updating time after one change from 7-8 seconds to instantaneously. The SUMPRODUCT I had used the full columns, and if I put it to only look at rows 1-500 it was fine. 

  13. [...] Speeding up Excel – 75 tips [Visitors: 36,157 ] Using Excel as your database [ 32,455 ] Comprehensive guide to VLOOKUP [ 23,745 ] 66 Dashboards visualizing Excel salary survey data [ 26,148 ] Interactive Sales chart in Excel [ 21,444 ] Compare 2 Excel sheets – howto? [ 21,820 ] Send mails using Excel VBA & Outlook [ 22,294 ] Customer Service Dashboard in Excel [ 18,136 ] Making your dashboards interactive [ 15,294 ] Extract numbers from text in Excel [ 18,490 ] [...]

  14. Vijaykumar Shetye says:

    TIPS FOR SPEEDING UP EXCEL

    (1) Instead of writing a lot of formulas to organise data, you can VLOOKUP() the data in a Pivot table, thereby combining the advantages of Pivot table and VOOKUP().
     
    (2) If you have a range named ‘TotalTaxForTheCurrentFinancialYear’, then it is not compulsory to use this name when making the worksheet. Naming the range as ‘Tax’ or simply ‘T’ will be sufficient. The formula =SUM(T) will be shorter and easier to use.
    After completing typing all the formulas, simply edit the name of the range from ‘T’ to ‘TotalTaxForTheCurrentFinancialYear’, in the name box. The formula =SUM(T) will automatically change to =SUM(TotalTaxForTheCurrentFinancialYear).

    Vijaykumar Shetye, India
     

  15. Jim Lyons says:

    VBA
    I don't write many macros and like most of you when doing a recalculation it sometimes takes forever. 
    I have found that when I looked at my spreadsheet, I could determine which order of calcuations (by column) would produce the least number of iterations. So I wrote a macro to do my calculations on my terms.  I picked the order of the columns I wanted to calcuate and it sped up my recalc 5-10X.
    I did this so long ago, I believe I used "expression .Calculate".

  16. Vijaykumar Shetye says:

     
    TIPS TO SPEED UP EXCEL by Vijaykumar Shetye, India
    You can view all the formulas in the entire worksheet quickly by pressing [ctrl] and [~] keys simultaneously.
    To view results, press the key combination again.
     

  17. sajjad says:

    i need help about excle lerning and reports making with dash bord i have no facility to join the on classes.
    sajjad.hussain165@gmail.com

  18. Is there any command to get time with seconds
    Is there any way to create an excel file for specific time period, afterwards it will not open

  19. [...] are looking for , but give it a try : Optimize Slow VBA Code. Speed Up Efficient VBA Code/Macros 75 Excel Speeding up Tips - How to speed-up & optimize slow Excel workbooks? | Chandoo.org - Lea... [...]

  20. Reuben says:

    I've had to do a lot of mass calculations for reports etc. that involved repetitive identical, yet complex formulae, which took forever...
    I hit on a great time-saver: sort the spreadsheet data; if, for example, the same result was due to a lookup of Hotel Name (A column), Date (B column), and Room Type (F column), the formula (Z column) would be: "=IF(A2&B2&F2=A1&B1&F1,Z1,VLOOKUP(A2&B2&F2,LookUps!A:G,7,FALSE))".
    This meant that if the result is the same as the row above, just use the same answer, thus saving loads of time instead of VLOOKUPs. (This is a simplified example, the actual one had INDIRECT(ADDRESS...) in it, too!)

  21. Sam says:

    Check files for invalid range names, invalid links and names that aren't needed any longer.

    Clearing out some 200 old references in a template made the file open go from 30 seconds to 2.

  22. MOhan says:

    You can improve the speed by stopping calculation during changing cell value and after that you can enable it. please follow the link.
    http://webtech-training.blogspot.in/2013/10/how-to-stop-heavy-formula-calculation.html

  23. […] 75 Excel Speeding Tips Its a long List, many repeated but worth a visit. […]

  24. […] Are you opening slow excel files?  Use this reference to speed up your excel sheets […]

  25. Karl Mavadia says:

    If you want to highlight the content or result within a cell with colour, use content colour not cell fill colour. This make a large data sheet fast as full colour takes up more resource.

  26. GraH says:

    There are already so many useful replies, so don't be mad at me if I repeat someone with the following hints.
    While using pivot tables:
    1. Link (raw) data from external files, rather then building pivots in the same workbook of the data. => Reduces file size.
    2. don't flag "keep source data" in pivot settings. => reduces cache.
    Downside is when you want to use slicers, you must allow refresh of the source data and thus people need access to that file.

    One extra when using tables above ranges: replace the table header references by cell references in heavy duty formulas. I'm not sure but it seems to be faster and lighter (in #MBs).

  27. reza says:

    hi
    iam student and need xloptimizer( no demo) for solving the mathematical model
    can you help me
    thanks alot

  28. himanshu parekh says:

    Dear Sir,

    Thanks a lot for sharing tips & tricks of excel....

    I read it , understand it and then use it in job and that has helped me a lot....

    Thanks a lot...

    Himanshu.
    Mumbai, India.

  29. Steven Hawksworth says:

    In VBA, send out values to the worksheet all together as an array then excel will only re-calculate once rather than each time a cell that is output.

  30. Andy Automation says:

    to the guy who said avoid looping in VBA - easier said than done, it's one of the most powerful uses for VBA out there. I'd therefore recomend the half way house and break the loop as soon as you've got what you want, don't let it run until the end. Use While etc.

    What I would say on VBA in general is minimise sheet to code interations. Suck all your data into a VBA array THEN do the maths don't use cells themselves as stand alone visual variables.

    And to the lady who said it's faster offline - that's because Microsoft are constantly contacting their own website be it security verification and/or update checks

  31. BeeHouseWV says:

    Apply some logic to the order of criteria in sumifs / countifs formula

    order the most exclusive criteria first. Once one criteria fails the others do not execute.

    Bing AI, given the following query, confirms this: "excel countifs. if one criteria is likely to exclude most of the data range then should this criteria go first in the list to prevent frivilous executions".

Leave a Reply