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.

12 Responses to “29 Excel Formula Tips for all Occasions [and proof that PHD readers truly rock]”

  1. Peder Schmedling says:

    Some great contributions here.
    Gotta love the Friday 13th formula 😀

  2. Aires says:

    Great tips from you all! Thanks a lot for sharing! bsamson, particularly you helped me on a terribly annoying task. 🙂

    (BTW, Chandoo, it's not exactly "Find if a range is normally distributed" what my suggestion does. It checks if two proportions are statistically different. I probably gave you a bad explanation on twitter, but it'd be probably better if you fix it here... 🙂 )

  3. John Franco says:

    Great compilation Chandoo

    For the "Clean your text before you lookup"
    =VLOOKUP(CLEAN(TRIM(E20)),F5:G18,2,0)

    I would like to share a method to convert a number-stored-as-text before you lookup:

    =VLOOKUP(E20+0,F5:G18,2,0)

  4. Chandoo says:

    @Peder, yeah, I loved that formula
    @Aires: Sorry, I misunderstood your formula. Corrected the heading now.
    @John.. that is a cool tip.

  5. Eric Lind says:

    Hey Chandoo,

    That p-value formula is really great for a statistics person like me.

    What a p-value essentially is, is the probability that the results obtained from a statistical test aren't valid. So for example, if my p value is .05, there's a 5% probability that my results are wrong.

    You can play with this if you install the Data Analysis Toolpak (which will perform some statistical tests for you AND provide the P Value.)

    Let's say for example I've got two weeks of data (separated into columns) with the number of hours worked per day. I want to find out if the total number of hours I worked in week two were really all the different than week one.

    Week1 Week2
    10 11
    12 9
    9 10
    7 8
    5 8

    Go to Data > Data Analysis > T-Test Assuming Unequal Variances > OK

    In the Variable 1 Box, select the range of data for week 1.
    In the Variable 2 Box, select the range of data for week 2.
    Check "Labels"
    In the Alpha box, select a value (in percentage terms) for how tolerant you are of error.

    .05 is the general standard; that is to say I am willing to accept a 95% level of confidence that my result is accuarate.

    Select a range output.

    Excel calculates a number of results: Average (mean) for each week's data, etc.

    You'll notice however that there are two P Values; one-tail and two-tail. (one tail tests are for > or .05), the number of hours I worked in week two is statistically equivalent to the number of hours I worked in week one.

    So here’s a way you might want to use this. You put up a new entry on your blog. You think it’s the best entry ever! So you pull your webstats for this week and compare it to last week. You gather data for each week on the length of time a visitor spends on your website. The question you’re trying to prove statistically is whether there’s an average increase in the amount of time spent on your website this week as compared to last week (as a result of your fancy new blog post). You can run the same statistical test I illustrated above to find out. Incidentally, it matters very little to the stat test whether the quantity of visitors differs or not.

    Anyhow, the Data Analysis toolpack doesn't perform a lot of stat tests that folks like me would like to have access to. In those cases I have to either use different software, or write some very complicated mathematical formulas. Having this p-value formula makes my life a LOT easier!

    Thanks!

    Eric~

  6. Balaji OS says:

    Fantastic stuf..One line explanation is cool.
    Thanks to all the contributors

    OS

  7. Locke says:

    Take FirstName, MI, LastName in access (you can fix it to work in excel) capitalize first letter of each and lowercase the rest and add ". " if MI exists then same for last name:
    Full Name: Format(Left([FirstName],1),">") & Format(Right([FirstName]),Len([FirstName])-1),"") & ". ","") & Format(Left([LastName],1),">") & Format(Right([LastName],Len([LastName])-1),"<")

    I teach excel, access, etc etc for a living and i have my access students build this formula one step at a time from the inside out to show how formulas can be made even if it looks complicated. Yes I know I could just do IsNull([MI]) and reverse the order in the Iif() function but the point here is to nest as many functions as possible one by one (also I illustrate how it will fail without the Not() as it is)

  8. Johan says:

    Extract the month from a date
    The easiest formula for this is =MONTH(a1)
    It will return a 1 for January, 2 for February etc.

  9. anjali says:

    if in a column we write the value of total person for eg. 10 if we spent 1.33 paise each person then how we get total amount in next column and the result will in round form plzzzzz solve my problem sir................... thank u

  10. Hui... says:

    @Anjali

    If the value 10 is in B2 and 1.33 paise is in C2 the formula in D2 could be =B2*C2

    If the values are a column of values you can copy the formula down by copy/paste or drag the small black handle at the bottom right corner of cell D2

  11. sajid says:

    kindly share with me new forumulas.

  12. Biswajit Baidya says:

    How to convert a figure like 870.70 into 870 but 871.70 into 880 using excel formula ? Please help.

Leave a Reply