Explore 1.5M+ audiobooks & ebooks free for days

Only $12.99 CAD/month after trial. Cancel anytime.

MrExcel 2021: Unmasking Excel
MrExcel 2021: Unmasking Excel
MrExcel 2021: Unmasking Excel
Ebook787 pages4 hours

MrExcel 2021: Unmasking Excel

Rating: 0 out of 5 stars

()

Read preview

About this ebook

MrExcel 2021 is designed to make the reader far more efficient in their use of Microsoft Excel. Originally designed for Bill Jelen's live Power Excel seminars, the target audience already uses Excel 40 hours a week. These tips are the "aha" tips that uncover secret methods in Excel. The book covers general Excel functions, pivot tables, formulas such as VLOOKUP and the new XLOOKUP. It introduces elements of modern Excel such as the Power Pivot Data Model and cleaning data with Power Query. Updated annually, this edition for 2021 adds information on LET and LAMBDA functions, amazing new data types, dynamic array formulas, and more.
LanguageEnglish
PublisherHoly Macro Books
Release dateApr 1, 2021
ISBN9781615471577
MrExcel 2021: Unmasking Excel

Read more from Bill Jelen

Related to MrExcel 2021

Related ebooks

Enterprise Applications For You

View More

Reviews for MrExcel 2021

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    MrExcel 2021 - Bill Jelen

    About the Author

    Bill Jelen is the host of MrExcel.com and the author of 61 books about Microsoft Excel including Excel Gurus Gone Wild and Excel 2019 Inside Out for Microsoft Press. He has made over 80 guest appearances on TV’s The Lab with Leo / Call for Help with Leo Laporte and was voted guest of the year on the Computer America radio show. He writes the Excel column for Strategic Finance magazine. He has produced over 2,300 episodes of his daily video podcast Learn Excel from MrExcel.

    About the Illustrators

    Cartoonist Bob D’Amico creates custom cartoons for business and more. See www.cartoonbob.com for more about his work.

    George Berlin is all about delight and wonder! He puts a smile on the world's faces with illustration, animation, and interactive projection art. See more at www.georgeberlin.com.

    Walter Moore is famous for his ape cartoons. If you need an illustration of the monkey business at your work, search Bing for Walter Moore Apes.

    Bobby Rosenstock is a print maker who specializes in woodcut and letterpress printing. He is owner of the letterpress and design studio in Marietta, Ohio, Just a Jar Design Press - www.justAjar.com.

    Chad Thomas is an illustrator who showcases his artwork on his website, www.whiterabbitart.com. His colorful and detailed artwork ranges from pet and people portraits to illustrations for children's books.

    Foreword

    After 17 years on the road, performing 35 Power Excel seminars a year, I had decided during 2019 to retire from the travel circuit. Little did I know that the pandemic would soon cancel all of the 2020 events. As I write this, we are hopeful that the vaccines work and we can finally unmask for 2021. In the meantime, I have booked a few online-only webinars. Check the MrExcel.com homepage for upcoming events.

    The book you are reading was the book that I used in those seminars. I would update the book for a new edition of Excel, print 5000 copies and hit the road. For 2020, this book was produced as an e-book only. For 2021, we are back to print. See what is new in each edition on the inside front cover of this book: What's new as of this 2021 edition: on page B

    You will see a number of shortlinks in this book in the format mrx.cl/short. The idea is that it will be easier for you to type mrx.cl than a long URL.

    Sample File Downloads

    The files used in this book are available for download from mrx.cl/2021bookfiles.

    #1 Ask Excel's A.I. a Question About Your Data

    A new Natural Language Query feature started rolling out to Microsoft 365 in late 2019. The feature uses artificial intelligence to answer questions about your data.

    The feature can be found near the right side of the Home tab. The icon is a blue lightning bolt. The label for the icon has changed between Insights, Ideas, Data Analysis, and Data Ideas.

    Note: Microsoft loves to do A|B testing with feature names. As I write this book, they are conducting one such test. One of my computers is calling the feature Data Analysis and the other is calling it Data Ideas. Microsoft might call it Analyze Data or Clippy 2.0. Any name will operate the same. By the time you are reading this, they will have settled on a name. In any case, look for the blue lightning bolt that is second from the right side of the Home tab.

    It is the #1 tip in this book because of this problem: (1) The feature has the potential to help millions of people, and (2) it is hidden where no one will find it.

    Anyone can perform advanced data analysis by simply asking questions by typing a sentence. Your data set can be up to 250,000 cells. Select one cell in your data. Use the blue lightning bolt icon on the right side of the Home tab.

    The Ideas icon is relatively new, near the right side of the Home tab.

    A box says to Ask A Question About Your Data and it gives you a few sample questions.

    Type a question such as Top 3 Products by 'Sales' where Category is Bikes. Excel restates your question and shows you a thumbnail of the report.

    If this is the correct analysis, you can use the +Insert Pivot Table icon to insert the results into a new worksheet in your workbook.

    Sometimes the feature will give you a chart when you want a table. Try adding as table to the end of your sentence.

    The Is this helpful? link in the lower right is not being used. The original idea was to use Machine Learning to suggest better reports in the future. But the reality is that Microsoft is taking privacy very seriously and they can't learn without retaining your data.

    New for 2021 is the Which Fields Interest You the Most?. This can be used to tell Excel that they should never offer to sum fields such as Year, Part Number, or Cost Center. You can choose to Sum or Average numeric fields. Or you can uncheck the field to make sure it is not in any of the suggestions.

    Even before you type a question, Excel will offer you 5-10 suggested reports and a link to load up to 30 more reports. If you aren't sure what you are looking for, it is sometimes interesting to read through these suggested reports.

    My one complaint about the feature is shown in the following chart. Ideas was able to find some outliers in this data and offers to create a chart with those points called out in orange. For this chart to work correctly, Excel would have to support conditional formatting in charts and it does not. That means that the pivot chart will always call out these three points, even if the underlying data changes and new outliers emerge. You would have to re-run Ideas and hope that a similar result is offered.

    This tile from Ideas shows that for Product Gadget, the Revenue has outliers on three specific dates.

    #2 Double-Click the Fill Handle to Copy a Formula

    You have thousands of rows of data. You’ve added a new formula in the top row of your data set, something like =PROPER(A2& &B2), as shown here. You need to copy the formula down to all of the rows of your data set.

    Many people will grab the Fill Handle and start to drag down. But as you drag down, Excel starts going faster and faster. There is a 200-microsecond pause at the last row of data. 200 microseconds is long enough for you to notice the pause but not long enough for you to react and let go of the mouse button. Before you know it, you’ve dragged the Fill Handle way too far.

    If you drag the fill handle, it is easy to shoot past the end of the data set and end up hundreds of rows below the last row of data.

    The solution is to double-click the Fill Handle! Go to exactly the same spot where you start to drag the Fill Handle. The mouse pointer changes to a black plus sign. Double-click. Excel looks at the surrounding data, finds the last row with data today, and copies the formula down to the last row of the data set.

    In the past, empty cells in the column to the left would cause the double-click the Fill Handle trick to stop working just before the empty cell. But as you can see below, names like Madonna, Cher, or Pele will not cause problems. Provided that there is at least a diagonal path (for example, via B76-A77-B78), Excel will find the true bottom of the data set.

    In row 77, a person with only a first name and no last name. While the blank cell in B77 would have previously caused the Double-Click-The-Fill-Handle to stop at C76, it now goes all the way to the bottom of the data.

    In my live Power Excel seminars, this trick always elicits a gasp from half the people in the room. It is my number-one time-saving trick.

    Alternatives to Double-Clicking the Fill Handle

    This trick is an awesome trick if all you've done to this point is drag the Fill Handle to the bottom of the data set. But there are even faster ways to solve this problem:

    Use Tables. If you select one cell in A1:B112 and press Ctrl+T, Excel formats the range as a table. Once you have a table, simply enter the formula in C2. When you press Enter, it is copied to the bottom.

    Use a complex but effective keyboard shortcut. This shortcut requires the adjacent column to have no empty cells. While it seems complicated to explain, the people who tell me about this shortcut can do the entire thing in the blink of an eye.

    Here are the steps:

    1. From your newly entered formula in C2, press the Left Arrow key to move to cell B2.

    2. Press Ctrl+Down Arrow to move to the last row with data—in this case, B112.

    3. Press the Right Arrow key to return to the bottom of the mostly empty column C.

    4. From cell C112, press Ctrl+Shift+Up Arrow. This selects all of the blank cells next to your data, plus the formula in C2.

    5. Press Ctrl+D to fill the formula in C2 to all of the blanks in the selection. Ctrl+D is fill Down.

    Five steps are shown. 1. Press Left Arrow to move from name in C2 to last name in B2. 2. Ctrl+Down to reach end of data in column B. 3. Press Right Arrow to move to mostly empty column D. 4. Ctrl+Shift+Up Arrow to select from C112 to C2. 5. Ctrl+D to Fill Down, copying the formula at the top of the range to all of the cells in the range.

    Note: Ctrl+R fills right, which might be useful in other situations.

    As an alternative, you can get the same results by pressing Ctrl+C before step 1 and replacing step 5 with pressing Ctrl+V.

    Thanks to the following people who suggested this tip: D. Carmichael, Shelley Fishel, Dawn Gilbert, @Knutsford_admi, Francis Logan, Michael Ortenberg, Jon Paterson, Mike Sullivan and Greg Lambert Lane suggested Ctrl+D. Bill Hazlett, author of Excel for the Math Classroom, pointed out Ctrl+R.

    #3 Break Apart Data

    You have just seen how to join data, but people often ask about the opposite problem: how to parse data that is all in a single column. Say you wanted to sort the data in the figure below by zip code:

    City, ST, Zip are in column A. With the data selected, choose Data, Text to Columns. In step 1 of the wizard, choose Delimited instead of Fixed Width.

    Select the data in A2:A99 and choose Data, Text to Columns. Because some city names, such as Sioux Falls, are two words, you cannot break the data at each occurrence of a space. Instead, you need to use a comma to get the city in column A and the state and zip code in column B, so choose Delimited in step 1 of the wizard and click Next.

    In step 2 of the wizard, deselect Tab and select Comma. The preview at the bottom of the dialog shows what your data will look like. Click Next.

    Step 2 of the wizard offers delimiters of Tab, Semicolon, Comma, Space and Other. When Comma is chosen, the data preview at the bottom shows City in A, and State Zip in B.

    Caution: For the rest of the day after you use Text to Columns, Excel will remember the choices you've chosen in step 2 of the Convert Text to Columns Wizard. If you copy data from Notepad and paste to Excel, it will be split at the comma. This is often maddening because most days, the data is not parsed at the comma, but for the rest of today, it will be. To fix it, close and re-open Excel.

    Step 3 of the wizard asks you to declare each column as General, Text, or Date. It is fine to leave the columns set as General.

    Step 3 of the Wizard. Leave each column with General format. Other choices are Text, Date, and Do Not Import Column.

    After you‘ve split the state and zip code to column B, select B2:B99 and again choose Data, Text to Columns. This time, since each state is two characters, you can use Fixed Width in step 1 of the wizard. To preserve leading zeros in the zip code, select the second column and choose Text as the data type in step 3 of the wizard.

    Still looking at Step 3 of the Wizard, choose the heading for the second column and declare zip codes to be Text.

    Tip: A lot of data will work well with Fixed Width, even it doesn‘t look like it lines up. In the next figure, the first three rows are in Calibri font and don‘t appear to be lined up. But if you change the font to Courier New, as in rows 4:7, you can see that the columns are perfectly lined up.

    7 rows of data is shown. Each row has First Name, Last Name, Address, City all in column A. In the first three rows, a modern font makes the data look like it is not lined up. But in rows 4-7, a monospace font such as Courier New is applied and the data is lined up. Thus, Fixed Width will work in Text to Columns.

    Sometimes, you will find a data set where someone used Alt+Enter to put data on a new line within a cell. You can break out each line to a new column by typing Ctrl+j in the Other box in step 2 of the wizard, as shown below. Why Ctrl+j? Back in the 1980's IBM declared Ctrl+j to be a linefeed. Ctrl+j also can be typed in the Find & Replace dialog box.

    In column A, you see Name, Street, City in one cell, separated by Alt+Enter. By typing Ctrl+J in the Other: box in step 2 of the wizard, Excel splits those lines into new columns.

    There are three special situations that Text to Columns handles easily:

    Dates in YYYYMMDD format can be changed to real dates. In step 3 of the wizard, click the column heading in the dialog, choose Date, then choose YMD from the dropdown.

    If you have negative numbers where the minus sign shows up after the number, go to step 3 of the wizard, click the Advanced Button, and choose Trailing Minus for Negative Numbers.

    Data copied from a Table of Contents will often have dot leaders that extend from the text to the page number as shown below. In step 2 of the wizard, choose Other, type a period, and then select the checkbox for Treat Consecutive Delimiters as One.

    Three data oddities that can be solved with Text to Columns: Dates stored as 20201225, numbers stored as 831.25- and a Table of Contents entry separated by the page numbers by an unknown number of repeating periods.

    #4 Convert Text Numbers to Numbers Quickly

    It sometimes happen that you end up with a long column of numbers stored as text and you need to convert those to real numbers.

    During 2020, the logic behind Convert to Number was rewritten. In the past, using this feature could take minutes, as Excel would recalculate the worksheet after each cell was converted to a number. Today, however, it is super-fast. Simply select the range of cells where the first cell is a number stored as text. An on-grid drop-down will appear to the left of the top text number. Open the drop-down menu and choose Convert to Number.

    Note that this option only appears if you have File, Options, Formula set to these:

    Before Convert to Number was rewritten, my favorite method of converting Text Numbers would be to select the column of text numbers and press Alt+D E F. This would run the column through the defaults of Text to Columns.

    For completeness, there is a third method. Select a blank cell and enter the number 1. Copy the 1 to the clipboard. Then select the cells with text numbers. From the Paste drop-down menu, choose Paste Special. In the Paste Special dialog, choose both Values and Multipy. When you multiply the 1 times text numbers, they will convert to real numbers. You can also copy any blank cell and then Paste Special Add. This adds a zero to the text numbers.

    #5 Filter by Selection

    The filter dropdowns have been in Excel for decades, but there are two faster ways to filter. Normally, you select a cell in your data, choose Data, Filter, open the dropdown menu on a column heading, uncheck Select All, and scroll through a long list of values, trying to find the desired item.

    The filter drop-down menu offers a Search box to quickly find an item.

    One faster way is to click in the Search box and type enough characters to uniquely identify your selection. Once the only visible items are (Select All Search Results), Add Current Selection to Filter, and the one desired customer, press Enter.

    But the fastest way to Filter came from Microsoft Access. Microsoft Access invented a concept called Filter by Selection. It is simple: find a cell that contains the value you want and click Filter by Selection. The filter dropdowns are turned on, and the data is filtered to the selected value. Nothing could be simpler.

    Starting in Excel 2007, you can right-click the desired value in the worksheet grid, choose Filter, and then choose By Selected Cells Value.

    Guess what? The Filter by Selection trick is also built into Excel, but it is hidden and mislabeled.

    Here is how you can add this feature to your Quick Access Toolbar: Right-click anywhere on the Ribbon and choose Customize Quick Access Toolbar.

    Right-click the Ribbon and the second choice is Customize Quick Access Toolbar. Other choices shown in the screenshot but not discussed are Show Quick Access Toolbar Below the Ribbon, Customize the Ribbon, and Customize the Ribbon.

    There are two large listboxes in the dialog. Above the left listbox, open the dropdown and change from Popular Commands to Commands Not In The Ribbon.

    In the left listbox, scroll to the command AutoFilter and choose it. That’s right: The icon that does Filter by Selection is mislabeled AutoFilter.

    In the center of the dialog, click the Add>> button. The AutoFilter icon moves to the right listbox, as shown below. Click OK to close the dialog.

    Using the Commands Not In The Ribbon category, find AutoFilter and click Add>> to add it to the Quick Access Toolbar.

    Here is how to use the command: Say that you want to see all West region sales of widgets. First, choose any cell in column B that contains West. Click the AutoFilter icon in the Quick Access Toolbar.

    This shows an unfiltered data set. The cell pointer is on the word West in the Region column. The mouse cursor is about to click the AutoFilter icon in the Quick Access Toolbar.

    Excel turns on the filter dropdowns and automatically chooses only West from column B.

    Next, choose any cell in column E that contains Widget. Click the AutoFilter icon again.

    The Filters have been activated. The Region column is only showing West. Next, in the Product column, a cell containing Widget is selected and the mouse is about to click AutoFilter again.

    You could continue this process. For example, you could choose a Utilities cell in the Sector column and click AutoFilter.

    Caution: It would be great if you could multi-select cells before clicking the AutoFilter icon, but this does not work. If you need to see sales of widgets and gadgets, you could use Filter by Selection to get widgets, but then you have to use the Filter dropdown to add gadgets. Also. Filter by Selection does not work if you are in a Ctrl+T table.

    How can it be that this feature has been in Excel since Excel 2003, but Microsoft does not document it? It was never really an official feature. The story is that one of the developers added the feature for internal use. Back in Excel 2003, there was already an AutoFilter icon on the Standard toolbar, so no one would bother to add the apparently redundant AutoFilter icon.

    This feature was added to Excel 2007’s right-click menu—but three clicks deep: Right-click a value, choose Filter, then choose Filter by Selected Cell’s Value.

    Bonus Tip: Filter by Selection for Numbers Over/Under

    What if you wanted to see all revenue greater than $20,000? Go to the blank row immediately below your revenue column and type >19999. Select that cell and click the AutoFilter icon.

    The data set extends to row 564. In cell F565, enter >19999 and then click the AutoFilter icon.

    Excel will show only the rows of $20,000 or above.

    The result: Only rows with $20K of Revenue are shown.

    #6 Total the Visible Rows

    After you’ve applied a filter, say that you want to see the total of the visible cells.

    Select the blank cell below each of your numeric columns. Click AutoSum or type Alt+=.

    A filtered data set is shown. The first blank row below the data is row 565. Select cells E565:H565 and click AutoSum.

    Instead of inserting SUM formulas, Excel inserts =SUBTOTAL(9,…) formulas. The formula below shows the total of only the visible cells.

    Instead of inserting =SUM functions, Excel inserts =SUBTOTAL functions with a first argument of 9. This function totals only the visible rows.

    Insert a few blank rows above your data. Cut the formulas from below the data and paste to row 1 with the label Total Visible.

    The Total Visible formulas from row 565 are cut and pasted above the data.

    Now, as you change the filters, even if the data fills up more than one full screen, you will see the totals at the top of your worksheet.

    Thanks to Sam Radakovitz on the Excel team for Filter by Selection – not for suggesting Filter by Selection, but for formalizing Filter by Selection! Thanks to Taylor & Chris in Albuquerque for the Over/under technique.

    #7 Save Filter & Sorting in Sheet View

    Do you share a workbook with co-workers? Does you co-worker want to Filter or Sort the workbook differently than you do? Eight years ago, I was ready to strangle my co-worker Scott when he kept filtering our project list to show only his projects.

    Amazingly, the Excel team has provided a new solution called Sheet View. It debuted for Microsoft 365 in March 2020.

    Caution: Sheet View only works if you store your workbook in OneDrive or SharePoint online. It is fine for everyone to access the workbook on the PC, but it has to be saved in the cloud.

    Below is a small workbook that Andy and Betty share. The Ribbon is showing the new Sheet View settings that are found on the View tab.

    Tip: Before you create a view for Andy or Betty, create an unfiltered view called All or Everyone or Default.

    To create a new Sheet View, click New.

    The new view is initially called Temporary View. Apply any formatting or sorting. In the image below, Andy has filtered to his records and sorted the projects high-to-low.

    If you want to be able to return to this view in the future, you can either click the Keep icon or simply type a new name such as Andy Descending.

    Notice that the Row and Column labels are now black. This is to alert you that you are seeing a Sheet View.

    When Betty opens the workbook, she can filter to Betty and sort ascending. She might name her view as BettyAscending.

    This next part is absolutely wild. Say that Andy edits cell C2 in his view and changes the value to $100,000.

    When anyone goes back to the Default view of the workbook, the original sort order is retained. But - the new value for Andy's project A008 is still $100,000!

    I've asked the Excel team how they manage to do this behind the scenes, and I still don't know how they manage to keep it all tied together. But it works.

    Tip: You might be happy having two different views of the workbook for your own use. But this feature is really designed for when you are collaborating with the whole department. See #12 Simultaneously Edit a Workbook in Microsoft 365 on page 44.

    #8 The Fill Handle Does Know 1, 2, 3…

    Why does the Excel Fill Handle pretend it does not know how to count 1, 2, 3? The Fill Handle is great for filling months, weekdays, quarters, and dates. Why doesn’t it know that 2 comes after 1?

    In case you’ve never used the Fill Handle, try this: Type a month name in a cell. Select that cell. There is a square dot in the lower right corner of the cell. This dot is called the Fill Handle. Hover over the Fill Handle. The mouse cursor changes from a white cross to a black plus. Click the handle and drag right or drag down. The tooltip increments to show the last month in the range.

    Note: If it is not

    Enjoying the preview?
    Page 1 of 1