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
Goto the Data, Text to Columns tab
Select Delimited
Select Other and Type Ctrl+J in the adjacent box
Next
Change the Destination to D2
Enjoy
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
- Select the range that contains blank cells you need to fill.
- Click Home > Find & Select > Go To Special…, and a Go To Special dialog box will appear, then check Blanks option.
- Click OK, and all of the blank cells have been selected.
- Assume that the Top Left Blank cell is A3, then input the formula =A2 into active cell A3 without changing the selection.
- Press Ctrl + Enter, Excel will copy the respective formula to all blank cells.
- At this point, the filled contents are formulas, and we need to convert the formals to values.
- 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
Select Create a single page field for me and Next
Select your data range, including a blank leading column and then click Add button.
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.
Now go the Pivot Table Field options and do the following
You should have a unique list of values
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…
- Select the cell range (the column).
- Press F5, you will get the Go To Menu.
- Check the option Blank.
- 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.
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
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”
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.
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
20 Responses to “Excel Tips, Tricks, Cheats & Hacks – Excel Ninja Edition”
There are a lot of shortcuts
Hide columns - CTRL + 0
Apply Filter (alternative) - SHIFT + CTRL + L
Clear Filter - ALT + D + F + S
Drag Down - CTRL + D
Drag Right - CTRL + R
Drag Up - ALT + E + I + U
Drag Left - ALT + E + I + L
Value Paste - ALT + E + S + V
Format Paste - ALT + E + S + T
etc..
I think the table set-up in #9 is incorrect. The price of 1,001 items should be $350.00 (1,000 @ $.35) plus $.33 (1 @ $.33), a total of $35.33. The spreadsheet calculates the total as $350.35.
If the amounts in the quantity column are changed to 1,000 and 5,000, the calculation is correct.
Thank you @Chris for pointing mistake. It should be like 0,1000,5000 🙂
Regards,
Faseeh
@Chris, Faseeh
Thanx Chris for the pickup
The post and sample file have been updated
Cool tips, but I don't understand the very first one. Why would you want to "Find and Replace" the Enter character, and what IS the Enter character?
@Jomili
The Enter character is the equivalent of a Carriage Return Char(13) and Line Feed Char(10) which originated in the old Manual Typewriter days
As invisible codes, they are often imported with text or other files which have been dumped from systems
They are still used even in text files to tell the system to start a new line
Even in Excel, you can enter text on multiple lines in a cell using an Enter (Ctrl J) to force the Line Feed
There are times where you actually don't want to start a new line
and so Search/Replace for Enter is Required
I agree with Jomili, that this first hack is hard to understand. Thank you for providing further information, which makes it more understandable. However, it might be nice to provide a more robust example for this one. As I think it is helpful, but still don't understand how to implement it. Thank you for this and for all the great hacks.
@Jomili, Liz
I have added a fully worked example and sample file to Tip 001 above
Please review
I hope this clears up the confusion
Works for me. Thanks for the clarification and the sample workbook.
My favourite trick is using Autocorrect to help write INDEX MATCH formulas..
Copy this into Autocorrect and then use iii as the text to replace
=INDEX( DblClk_to_Select_Column_to_return, MATCH( DblClk_Single_Lookup_Cell, DblClk_Lookup_Column, 0),0)
This way whenever you need INDEX MATCH you just type iii and autocorrect kicks in and you are 3 double clicks away from a robust formula.
https://www.linkedin.com/pulse/stop-using-vlookup-wyn-hopkins
@Wyn
Great Idea!
Nice one Wyn. Gets rid of that problem where the word MATCH disappears as I'm typing the surrounding INDEX function.
(note: I did not write this and have since lost the source)
I love this site, thought I would try and contribute something to return value.
When building pivot tables, it helps to have a full column of like values, so if you have a set up such as:
A B C
1 X B C
2 B C
3 B C
4 Y B C
5 B C
6 B C
Use this handy VBA
Sub FillBlanks()
Dim Area As Range, LastRow As Long
Dim MyCol As String
MyCol = "A"
On Error Resume Next
LastRow = Cells.Find(What:="*", SearchOrder:=xlRows, _
SearchDirection:=xlPrevious, LookIn:=xlFormulas).Row
For Each Area In Columns(MyCol).Resize(LastRow). _
SpecialCells(xlCellTypeBlanks).Areas
Area.Value = Area(1).Offset(-1).Value
Next
End Sub
'Change the MyCol value to match your value
Becomes...
A B C
1 X B C
2 X B C
3 X B C
4 Y B C
5 Y B C
6 Y B C
A more robust solution to filling blanks:
Sub FillBlanks()
' Purpose : Fills blanks with value above
Dim Response As Integer
Dim oRng As Range
Set oRng = Selection
'Check for Rangesize
If Application.Run("RangeCheck") = True Then
MsgBox "You've selected an entire Row or Column." & vbCrLf & _
"Please select a section of a single column range to check.", vbCritical, "Range Too Large to Process"
Else
If Selection.Count = 1 Then
MsgBox "You need to select the range you want to fill," & vbCrLf & _
"from first populated cell to the last empty cell", vbOKOnly, "Help from John"
Else
oRng.SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
Response = MsgBox("The cells have been filled with formulas." & vbCrLf & _
"Do you wish to convert them to Values?", vbYesNo + vbQuestion, "Help from John")
If Response = vbYes Then
oRng.Copy
oRng.PasteSpecial Paste:=xlValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End If
End If
End If
End Sub
Private Function RangeCheck()
RangeCheck = False
'Check for Rangesize-Used in MULTIPLE Macros
If Selection.Columns.Count = ActiveSheet.Columns.Count Or Selection.Rows.Count = ActiveSheet.Rows.Count Then
RangeCheck = True
End If
End Function
Hi to all,
Very interesting tips and tricks, Thanks Hui.
And thanks to all our great ninjas.
Regards,
Khalid
Further to tip 12, if I'm doing a lot of pasting values/formulas then I will also assign Copy to the QAT, in position 1.
Instead of doing a big move of my hand from Ctrl+C to Alt+2, I can just move a finger from Alt+1 to Alt +2.
Speeds things up quite a bit!
In vlookup functions where successive rows / columns need to be filled with using auto increment columns I have found use of Row() or Column() to be useful as a datatype to generate autoincrement number when formula is copied from one cell to the next adjacent cell.
1. Most of the accountants format the numbers into Comma Style (accounting) and reduce the decimal count. With this, when they copy paste table into PowerPoint, they will see lot of spaces which becomes very cumbersome to format (like font sizes / table auto fit). One way to overcome this is to format with Number and select "(" option to replicate the same of accounting format.
2. New Excel users think the consolidation of many workbooks is complex and requires lot of time to do. But for the same formatted data (in most of the cases of unit operations), only need is two macros and one formula. There are many macros is available to combining multiple files into one workbook and other macro is to get the sheet names. One formula required is indirect with the help of what all data needs to be consolidated.
Another great use for Find & Replace:
Need to restructure your workbook and don't want REF errors or relative references changing?
Use Find and Replace to Swap out the "=" in all affected formulas with "^" or any other symbol you're not using. Now you can move your formulas and reverse the process, Replacing "^" with "=" to keep everything functional and intact.
how to login on chandoo.org..
i made my account but its very difficult to find out the sign in option. please help me out to find the signin page.