0% found this document useful (0 votes)
45 views28 pages

651583ae687da6b4bb46bd39 Exceleration Ebook

The document provides tips and tricks for using Excel more effectively. It discusses using FILTER instead of XLOOKUP for more flexible lookups. It also presents methods for automatically numbering lists, highlighting the active row and column, and using custom formatting as an alternative to conditional formatting.

Uploaded by

Salim Loukil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views28 pages

651583ae687da6b4bb46bd39 Exceleration Ebook

The document provides tips and tricks for using Excel more effectively. It discusses using FILTER instead of XLOOKUP for more flexible lookups. It also presents methods for automatically numbering lists, highlighting the active row and column, and using custom formatting as an alternative to conditional formatting.

Uploaded by

Salim Loukil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Exceleration

eBook
Updated: September 2023

Excelerate
beyond the
imaginable
New pro tips

25 top-notch tutorials Step-by-step guidance


TOPIC PAGE

Why FILTER instead of XLOOKUP? 01 ↘


Numbered lists 02 ↘

Table of
Highlight active row and column 03 ↘
Custom formatting 04 ↘
Display function arguments in a cell as text 05 ↘

Contents
Extracting text 06 ↘
Generate formulas automatically 07 ↘
Spot the difference 08 ↘
Extract sorted rows from table 09 ↘
Insert a date picker 10 ↘
Evaluate formula parts 11 ↘
Combine tables with VSTACK 12 ↘
Calculate running tables 13 ↘
Insert images into cells 14 ↘
FILTER with AND criteria 15 ↘
Stop using SUMIF! 16 ↘
4 ways to combine text values 17 ↘
Visualise data with sparklines 18 ↘
Analyze Data in Excel 19 ↘
Difference between two dates 20 ↘
Create folders in File Explorer 21 ↘
Build a star rating system 22 ↘
Fix incorrect percentages 23 ↘
Count characters and words 24 ↘
Hidden rows vs unfiltered rows 25 ↘
Tip #1

Why FILTER instead


of XLOOKUP?
Lookups have long been a staple of Excel, whether VLOOKUP, INDEX & MATCH or the newer XLOOKUP.
So many daily tasks depend on them, and their use is ubiquitous in homes and offices across the length
and breadth of the world.
The problem is they can be overused — and getting blasé about their limitations can be costly. One
of them is the single matching row restriction. Sometimes, this is what you want, but other times it's not.
In the video example, a table called tblSales houses sales figures for a calendar year. We want to find
the month that has the highest total. There are a couple of ways we can do this.

METHOD 1 METHOD 2
MAX returns the highest sales figure from FILTER returns the months with a sales
Total. This is then looked up in the same figure equal to the maximum in Total.
column, and the adjacent month returned.

=XLOOKUP( =FILTER(
MAX(tblSales[Total]), tblSales[Month]
tblSalesp[Total], tblSalesp[Total]=MAX(tblSales[Total])
tblSales[Month] )
)

It's evident that Method 2's FILTER is better, as there is the possibility of repetition, which
XLOOKUP doesn't cater for.
There's also a broader point in all this. Sometimes data is favourable. Other times it's messy,
ugly, obscure, and full of anomalies. Just because a formula works in one instance doesn't
mean it'll work in another. That's why stress-testing your formulas is vital for achieving
accuracy and factuality in different scenarios.

▶ Watch video
Tip #2

Numbered
lists
You might create a numbered list in Excel to help organise and keep track of workplace tasks
or a personal to-do list.
A hallmark of any good list is sequential numbers beside the items. They provide structure,
clarity, and order of importance.
There are numerous ways of generating these numbers. However, people commonly resort
to the easiest methods, unaware of the repercussions that can occur.
Three methods are shown in the video.

1. Input 1 in A2 and 2 in A3, and then select this range and double-click on the
fill handle to populate the rest of the column with the sequence.
2. Input 1 in A2 and use the formula =A2+1 in A3 to add 1 to the cell's value
above. The row number increments in each cell.
3. The formula =SEQUENCE(COUNTA(B:B)-1) combines SEQUENCE with
COUNTA to generate a sequence of numbers based on the quantity of
cells that are not empty in column B. 1 is also subtracted to prevent the
header row from being included in the count.

With the first two, adding items means manually extending the number sequence, and deleting rows
in the middle requires a reset.
However, the last method does not have these problems, as it's a dynamic array formula, ensuring you
can add new items and delete existing ones without messing up anything.

▶ Watch video
Tip #3

Highlight active
Ever lose track of where you are in a worksheet? It's a common problem when navigating large datasets. You're
flicking between cells, switching applications, and your eyes are darting between places. You're handling sensitive
data and want to be sure you're focusing on the correct record, but the further away you get from the row and
column headers — the worse it gets.

row and column


You wish there were a better solution than meticulously sliding your index finger across the screen. Unfortunately,
Excel doesn't have a built-in feature for this, but there is a workaround.

Do the following:
1. Select a range.
2. Go to Home > Conditional Formatting > New Rule.
3. Select Use a formula to determine which cells to format.
4. Input =OR(CELL(″col″)=COLUMN(),CELL(″row″)=ROW()).
5. Select Format and choose a fill colour.
6. Select OK twice.

You can now highlight the active row and column of the cell you're in by pressing F9 to recalculate the workbook.
The upside of this method is there's no VBA. The downside is it isn't automatic.

However, adding some VBA code allows you to create an event that automatically performs
this recalculation:
1. Press Alt + F11 to open the VBA Editor.
2. Open the relevant sheet object.
3. Input the code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)


If Application.CutCopyMode = False Then
Application.Calculate
End If
End Sub

The active row and column now highlight automatically as you navigate the worksheet range.

▶ Watch video
Tip #4

Custom
formatting
Conditional formatting is often used to apply styling to cells that satisfy certain criteria.
By making important values stand out, it's great for analysing data quicker.
However, anyone familiar with the Conditional Formatting window will know how easily
it gets clogged up with a gazillion different rules. Using it excessively can also slow down your
workbook.
There is an alternative, though, which may suffice in certain situations: custom formatting.
Many people have found it more efficient and lightweight when applying formatting to
a large range of cells.
In this example, we have a table of sales reps with their figures for last month and
this month. We also have a column showing the changes as percentages.

We can improve the appearance of the column by carrying out the following:

1. Select the range.


2. Open the Format Cells window (Ctrl + 1).
3. On the Number tab, choose the Custom category.
4. In the Type field, input [Color10]0% ″▲″;[Red]-0% ″▼″;
5. Select OK.

Positive values now display in green beside a ▲, negative ones as red beside a ▼,
and zeros as blanks.
[Color10] refers to one of 56 colours supported by custom formatting, and [Red] is one of eight
standard names. Unfortunately, the limited colour palette is based on early versions of Excel, so we
can't access the 16.7 million found in the main colour window of Excel 2007 and beyond.
The ▲ and ▼ symbols are featured in Insert > Symbols under fonts like Arial. Simply double-click on each
to insert them in the active cell so they can be copied and pasted across.

▶ Watch video
Tip #5

Display function
arguments in a cell
as text
Want an easy way to display a function's arguments in a cell? Instead of typing them out, do this:

1. Type = followed by a function.


2. Press Ctrl + Shift + A to return the function's arguments.
3. At the start of the formula, put a single quotation mark (′) to force it to display as text.

You might want this to understand a function better or to explain a formula to a colleague
Whatever the reason, don't waste time doing it the manual way!

▶ Watch video
Tip #6

Extracting
text Not too long ago, extracting text in Excel was a bit of a nightmare. Sure, we've always had functions like
LEFT, RIGHT, MID, LEN, and FIND to help us, but even the simplest extractions could require a lengthy
formula.
That changed last year, as Microsoft announced a new set of text functions that made things
significantly easier for us:
▶ TEXTBEFORE — return text from a value that is before a specific delimiter.
▶ TEXTAFTER — return text from a value that is after a specific delimiter.
▶ TEXTSPLIT — split text into rows or columns according to a specific delimiter.
The text string ″Global Excel Summit″ is contained in cell A2. This is referenced in the following formulas
to extract certain parts:

The delimiter used in all of them is a space


'Global' enclosed in quotation marks (″ ″). By default, the
=TEXTBEFORE(A2,″ ″) first instance of a space is found first; however,
'Global Excel' setting the [instance_num] argument to 2
ensures the second occurrence is prioritised.
=TEXTBEFORE(A2,″ ″,2)
'Excel Summit' Extracting ″Excel″ is more challenging than the
others because it's in the middle of the string.
=TEXTAFTER(A2,″ ″) That's why splitting the whole value first with
'Summit' TEXTSPLIT and then setting INDEX's
=TEXTAFTER(A2,″ ″,2) [column_num] argument to 2 is necessary
to only return one value.
'Excel'
=INDEX(TEXTSPLIT(A2,″ ″),,2) On a final note, don't forget there are other ways
to extract text as well. Text to Columns, Flash Fill,
and Power Query are all alternatives!

▶ Watch video
Tip #7 Ever used Flash Fill? It's a tool that automatically populates a column with values based on a pattern it
senses according to your input. Whilst useful for quickly generating a set of values, Flash Fill has one big
downside: what it produces is static. This means if the source data changes in any way, the generated

Generate formulas
values remain the same. Unfortunately, this limits its usefulness.
However, a new feature called Formula by Example addresses this limitation. Instead of static values,
it intelligently constructs a formula for a column based on the initial values you plug in.
Formula by Example started rolling out to Excel for the web users in January. You can use it for things

automatically
like text transformations, date transformations, and arithmetic calculations. Only tables are currently
supported, though, so it won't work with ranges yet.

EXAMPLE 1
Extract first name:

=LEFT([@Name], FIND(″ ″, [@Name]) - 1)

Extract last name:

=RIGHT([@Name], LEN([@Name]) - FIND(″ ″, [@Name]))

E.g. Ethan Martinez → Ethan | Martinez

EXAMPLE 2
Return date's month as text:

=TEXT([@Date], "mmmm")

E.g. 25/06/2023 → June

EXAMPLE 3
Round sales figure to nearest thousand:

=ROUND([@[Total sales (£)]] / 1000, 0) * 1000

▶ Watch video
E.g. 23721.80 → 24000.00
Tip #8

Spot the
difference
Just because data looks identical, it doesn't mean it is.
That's the key message of this video, which demonstrates how two values that look the same are
actually different.
'Hello world' is contained in cells B2 and B3, each referred to as Value A and Value B, respectively.
After testing them for equality using =B2=B3, FALSE is returned. Their lengths are then checked for
any trailing spaces. There turns out to be one in Value A, but even after removing it, the equality test
does not change.
The difference only becomes apparent after returning the Unicode numbers for the spaces that
separate the two words. This is done using =UNICODE(MID(B2:B3,6,1)).
Unicode is a universal encoding standard that has a unique value assigned to every character, symbol,
and script used in language worlds. Its purpose is to ensure the consistent representation of text across
different platforms and devices.
Inside UNICODE, MID is nested, and the range is specified before putting a start_num of 6 as both
spaces are the sixth character. A num_chars of 1 is also added to extract only that character.
The Unicode numbers returned are 32 and 160, proving there is a difference. Value A's space is copied
across and pasted to replace Value B's. With both now featuring spaces that use number 32, all things
are equal, and TRUE is returned.
You might encounter this problem if you copy and paste something from the web. Nevertheless, it's
worth being aware of when you're cleaning and transforming your data because it can mess up your
analysis in a very sneaky way.

▶ Watch video
Tip #9

Excel tables allow us to filter and sort data, hiding the surplus and putting it in ascending or descending

Extract sorted
order.
However, clearing the filter and sort state means the table reverts back to its original condition, so you
may desire a more permanent solution. Formulas give us the flexibility to decide what, where, and how

rows from table


the data is outputted.
In this example, we have a customer table and plan on rewarding the top five longest-serving customers
with an email gift.
To contact them, we need to obtain their details but only want to return the relevant data without any
unnecessary extras.
Using CHOOSECOLS, we specify the column numbers corresponding to the columns we want
returned: Name, Email, and Registration Date.

=CHOOSECOLS(tblCustomers,2,3,8)

We then wrap SORT around this statement and put 3 as the [sort_index] to place the rows
in ascending order according to their registration dates.

=SORT(
CHOOSECOLS(tblCustomers,2,3,8),
3)

The final stage is to use TAKE to extract only the first five rows of the sorted array.

=TAKE(
SORT(
CHOOSECOLS(tblCustomers,2,3,8),
3),
5)

▶ Watch video
Tip #10

Insert a
date picker
Inputting a column of dates manually is a tedious process that can result in inconsistent formats and
erroneous values.
Therefore, it would make sense to use a date picker. Except, Excel does not have one natively — at least
not in 64-bit versions. This means you're dependent on third-party add-ins.
There're a few out there, but a particularly good one is featured on a website called Rad Sheets.
Do the following:

1. Go to http://samradapps.com/datepicker, scroll down and select Download now.


2. Select Save as, and create a new folder in the C drive called XLStart.
3. Save the ZIP file in that folder, copy the add-in file from within and paste it outside.
4. Delete the ZIP file.
5. In Excel, go to File > Options > Advanced, scroll down and find At startup, open all
files in. Specify the folder directory C:\XLStart and select OK.
6. Close all instances of Excel and then reopen a window.

The date picker button now appears in the ribbon and as an icon beside the active cell if it uses the Date
number format or is directly below a cell that contains a date.
Have a go and see what you think. Hopefully, we won't have to rely on third-party add-ins in the future,
but it's the best we've got for now!

▶ Watch video
Tip #11

Cell errors give us headaches.

Evaluate
We've all constructed what we thought was a perfect-looking formula, only for Excel to spit a dreaded
#DIV/0!,#N/A, or #VALUE! in our faces.
Other times, it doesn't even get to that stage — a popup warning is thrown instead. It's particularly bad

formula parts
when dealing with long, unwieldy formulas, which some people call megaformulas.
Where on earth is this error coming from? Without resorting to help, it's easy to spend hours dissecting
a formula to try and discover the root cause of the problem.
Thankfully, Excel has a few options to assist. One of them is in-cell debugging.

THE NEW WAY


Value preview tooltips allow you to evaluate parts of a formula simply by selecting a tooltip argument or
highlighting a portion of code. This triggers another tooltip with the calculated value.
Problems are best understood when they're broken down, and this is a great way of doing that. It's
currently available to Microsoft 365 Insiders on the Beta Channel. (Get used to the new name!)

THE OLD WAY


For you non-Insiders, this is the current way! Select a tooltip argument or highlight a formula portion and
press F9. The part is replaced by the value.
Typically, you'll want to undo the change once you've understood it. Press Ctrl + Z to do so or Esc
to cancel the changes and exit the formula completely.

THE ADVANTAGES OF THE NEW WAY


There's no doubt it's quicker and more convenient to evaluate formula parts using your mouse.
Storing the evaluation in a tooltip also separates it from the calculation, thus preventing the formula
from becoming bloated. Plus, there's no chance of mistakenly pressing Return to save it as a hard-
coded value.

To find out more about value preview tooltips, check out https://insider.microsoft365.com/en-us/
blog/check-your-formula-with-value-preview-tooltips-in-excel.

▶ Watch video
Tip #12

Combine tables
with VSTACK

Combining data from different worksheets is a common task. Yet, it used to be a nightmare, with a
plethora of bloaty and inefficient formulas our only option.
Thankfully, since the introduction of the VSTACK function, it's a lot easier, as it lets us stack ranges on top
of each other with a single formula.
In this example, we have sales data for January, February, and March, each stored in separate worksheets.
Our Combined worksheet houses the consolidated data, with the formula
=VSTACK(tblJan,tblFeb,tblMar) referencing each table name to return one big table with everything.
It's as simple as that!
Unfortunately, as this is a dynamic array formula, it's incompatible with official Excel tables, so you cannot
use the filter and sort tools.
However, the formula can be modified to produce the same results.
For example, to return the combined data ordered by largest to smallest sales, we use
=SORT(VSTACK(tblJan,tblFeb,tblMar),3,-1), with a [sort_index] of 3 to reference the third
column (Total), and a [sort_order] of -1 for descending order.

▶ Watch video
Tip #13

Calculate Running totals are commonly used for keeping track of sales figures and monitoring the balance
on a bank statement. But how can you create one in Excel?

running tables
There are multiple methods, but let's look at two contrasting ones (as shown in the video). A table called
tblSales houses some sales data, and we want to return the running total of the Total (£) column.

TRADITIONAL METHOD

=SUM($B$3:B3)

The first cell in the Total (£) column is referenced inside SUM as part of an expanding range. The left
part is made absolute to prevent it from shifting as the formula is copied down using the fill handle.
On the other side of the colon, the ending reference is relative to ensure the row number increases
incrementally.

MODERN METHOD

=SCAN(0,tblSales[Total (£)],LAMBDA(a,b,a+b))

SCAN applies a custom LAMBDA to each value in an array and returns another containing the
intermediate values created after scanning. 0 is the initial_value, while the Total (£) column
is the array. The LAMBDA takes two parameters: accumulator (a) and value (b). The accumulator (a)
starts at the initial_value and iteratively totals up the figures, while the value (b) contains
the current one that gets added to the accumulator (a).

REMARKS
The obvious upside of the newer method is only a single formula is required, whereas 10 are needed for
the old approach. Using fewer formulas is more efficient — there's less to go wrong.
However, the downside is dynamic array formulas are incompatible with tables, meaning they can only
live outside. There are other table-compatible methods that use structured references, but they still
require one formula per value.
▶ Watch video
Until recently, images were largely a decorative feature of worksheets, which sat on cells rather than in
them. Although there were clunky workarounds, none of them satisfied us. The IMAGE function changed
Tip #14 all that. It gives us an easy way to reference web images inside the likes of XLOOKUP, FILTER and SORT.
FUNCTION SYNTAX

Insert images =IMAGE(source, [alt_text], [sizing], [height], [width])

into cells
▶ source — URL of the image.
▶ [alt_text] — alternative text that describes the image.
▶ [sizing] — specifies the image dimensions. It has four possible values:
▷ 0 — fit the image in the cell and maintain its aspect ratio. (Default)
▷ 1 — fill the cell with the image and maintain its aspect ratio.
▷ 2 — display the image at its original size.
▷ 3 — use a custom size based on the height and/or width values.
▶ [height] — the custom height of the image.
▶ [width] — the custom width of the image.

In the video example, we retrieve the flag of Finland using this formula:

=IMAGE("https://www.countryflags.com/wp-content/uploads/uploader/finland-
flag-png-large.png"
")

We can also retrieve many flags at once as the URLs have a pattern. CONCAT concatenates the
repeating parts of the URL with the country name in between. Wrapping this inside LOWER ensures the
URL is in lowercase, which is necessary to avoid an error:

=IMAGE(
LOWER(
CONCAT("https://www.countryflags.com/wp-content/uploads/uploader/",
[@Country],
▶ Watch video "-flag-png-large.png")
)
)
Tip #15
The FILTER function lets us sieve a table to extract only the desired rows based on criteria. In the video
example, a table called tblProducts houses product data, and we want to return only the items that
cost under £100. This formula achieves the result:

FILTER with =FILTER(tblProducts, tblProducts[Price (£)]<100)

AND criteria
The table name is referenced in array to return all columns, whilst the condition is specified in include
to return all rows where the value in the Price column is less than 100. The condition evaluates to an
array of TRUE and FALSE values that represent the rows and indicates which ones to return:

{TRUE;FALSE;TRUE;TRUE;FALSE;FALSE;TRUE;TRUE;FALSE;TRUE;TRUE;FALSE;FALSE;
FALSE;FALSE;FALSE;FALSE;FALSE;TRUE;TRUE}

Often, you're likely to require more than one criterion, though. The function provides no obvious way of
doing this. However, there is a way:

=FILTER(tblProducts,
(tblProducts[Price (£)]<100)
*(tblProducts[Rating]>=4)
)

Building on the same condition as the first example, an asterisk is added after, which is the multiplication
operator representing AND criteria. The second condition then returns all rows with a value greater than
or equal to 4 in the Rating column.
This calculation is taking place:

{1;0;1;1;0;0;1;1;0;1;1;0;0;0;0;0;0;0;1;1}
*
{0;1;1;0;1;0;0;1;0;0;0;1;0;0;0;1;0;1;1;0}

Because two conditions are multiplied, the TRUE and FALSE array values are coerced into 1s and 0s.
Multiplying by 0 is always 0, so both respective values must equal 1 for their row to be returned.
▶ Watch video
Finally, if using multiple conditions, be sure to enclose each one in brackets to avoid any unusual
results.
Tip #16

Stop using
SUMIF!
Everyone knows SUM. After all, it was almost certainly the first function you learned in Excel. While it's
useful for calculating a whole column of numeric values, that isn't always what you want.
A frequent task is to total up a column based on one or more conditions, and there are two functions for
this: SUMIF and SUMIFS.

SYNTAXES

=SUMIF(range, criteria, [sum_range])


=SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2, criteria2, ...)

In the video example, a table called tblSales houses some sales data. SUMIF is used to sum the Sales
rows where the corresponding values in the Region column are equal to 'North'. However, it's then
decided an additional criterion is needed to only consider Month rows equal to 'Mar'.
This is where SUMIFS comes in. The only fundamental difference is SUMIF handles a single criterion,
whereas SUMIFS can deal with multiple criteria.
However, it can cause confusion because the sum_range argument comes last in SUMIF but first in
SUMIFS.

WHY?
SUMIFS appeared in Excel 2007 as an alternative to SUMIF. As SUMIFS was made to support up to 127
criteria, it probably didn't make much sense to put sum_range last, hence the position change.
Is it time SUMIF was removed? Oh, and COUNTIF, for that matter.

▶ Watch video
Tip #17

4 ways to combine
text values Combining text values is a common task in Excel. There are many ways to do it, but let's focus on a few
function-based methods. In the example, there's a list of first names (A3:A8) and last names (B3:B8)
housed in separate columns. The goal is to combine them into a single column of full names. To start
with, a CONCAT formula is used for each row to join together the two values with a space in between.

E.g. =CONCAT(A3," ",B3)

TEXTJOIN is then used in a similar way. This function has the advantage of only needing a delimiter
specified once. That's not an issue here, however.

E.g. =TEXTJOIN(" ",,A3:B3)

Whilst these approaches work, they require six formulas, which isn't good practice in modern Excel.
One solution is CONCATENATE, a deprecated function still present for compatibility reasons.
Referencing the ranges is found to spill the names exactly as desired, contrary to CONCAT and
TEXTJOIN, which make them appear in the same cell.

=CONCATENATE(A3:A8," ",B3:B8)
=CONCAT(A3:A8," ",B3:B8)
=TEXTJOIN(" ",,A3:A8,B3:B8)

Although CONCATENATE does the job, it's old. The alternative method and the best out of the lot is to
use the ampersand operator to 'glue' together the strings in the ranges, leaving a space in between.

=A3:A8&" "&B3:B8
▶ Watch video
Tip #18

Visualise data
with sparklines
There are many ways to visualise data in Excel. Commonly, full-scale charts are used, but too many
of these can clutter up a worksheet.
An alternative is sparklines. A sparkline is a mini chart embedded in a cell that provides a visual
representation of data.They are useful for casually glancing to spot trends and variations while
conserving space.
The process of inserting one is simple.
Select some data, go to the Insert tab, and choose a sparkline type from the following:

1. Line — suitable for continuous data.


2. Column — suitable for continuous data.
3. Win/Loss — suitable for dichotomous data.

The Sparkline contextual tab will appear whenever the active cell features a sparkline. This has various
customisation options to fine-tune it.
In the video example, average temperature data is displayed for 10 locations around the world
in a calendar year.
Initially, conditional formatting's Color Scales is used to highlight the temperatures shades of red
or blue, depending on how high or low they are.
Then, each sparkline type is created in a separate column with the maximum and minimum temperatures
shown as darker red and blue blobs and bars.
Sparklines are a fantastic feature to take advantage of!

▶ Watch video
Tip #19

Analyze Data
in Excel ChatGPT has been all the rage recently, but did you know about Excel's very own natural language
processing (NLP) feature? Analyze Data (formerly Ideas) empowers you to generate insights about your
data effortlessly.

HOW TO USE ANALYZE DATA


Select your data range (Ctrl + Shift + Space) and go to Home > Analyze Data.
A pane opens on the right with a list of suggested visuals. Each can be inserted as a Chart, PivotChart,
or PivotTable, depending on your data.

Alternatively, type a question in the text box.


You might ask:

▶ "which five products sold the most?"


▶ "how did mountain bikes sell over time?"
▶ "what were the sales by category?"

Analyze Data cuts to the chase and gives you instant answers. It's great for bypassing the distractions
that charts, PivotTables, and PivotCharts have when created the standard way.
It'll also be interesting to see how it evolves to become more intelligent and responsive to users' needs.

▶ Watch video
Tip #20

Difference between
two dates
To find the difference between two dates, you can subtract the older date from the newer one. That will
return the difference in days; however, you might want it in weeks, months, or years.
The little-known DATEDIF function is the perfect solution for this. You won't see any mention of it
in Excel, as it's undocumented. However, its versatility prevents the need to construct long, windy
formulas to achieve the same result, and therefore worth considering.
Just make sure you use it responsibly…
SYNTAX

=DATEDIF(start_date, end_date, unit)

▶ start_date — the start date.


▶ end_date — the end date.
▶ unit — the time unit the date difference is returned in:
▷ Y — difference in complete years.
▷ M — difference in complete months.
▷ D — difference in days.
▷ MD — difference in days, ignoring months and years.
▷ YM — difference in months, ignoring days and years.
▷ YD — difference in days, ignoring years.

▶ Watch video
Tip #21

Create folders
in File Explorer If you've ever needed a large number of new folders in File Explorer, going through the tedious process
of manually creating each one and naming them is bound to drive you crazy.

With this method, say goodbye to the manual way as you generate a set of folders in a flash. And believe
it or not, the process starts in Excel!

Define your folder name structure using a formula like ="MD "&UPPER([@[Last Name]])&"_"&[@
[First Name]], remembering to start with 'MD', which stands for 'Make Directory'.

1. Select the values and copy them (Ctrl + C).


2. Paste the values (Ctrl + V) in a new Notepad window.
3. Go to File > Save as, and rename the file, ending it with .bat (batch file).
4. Create a folder in your chosen location and select Save.
5. Double-click on the batch file to generate the folders.

▶ Watch video
Tip #22

Star rating systems are an effective visualisation tool for making snap judgments about data. Although

Build a star rating


conditional formatting can achieve one, your options are limited. This formula-based method gives
you complete control over the stars' breakpoints, so they can kick in disproportionately if desired. This
is ideal for suiting the kind of data you're working with. Moreover, half-stars are also used to add extra
precision.

system
In the movies table, the Rating column displays a number out of 100 for each. How do we convert
these figures into something more aesthetically pleasing?
This formula does the trick:

*Due to compatibility, ½ (half-star) and 1 (full-star)


=LET(
are used instead of their respective symbols.

FullStar, SWITCH(TRU‌​E,
[@Rating]>=90,5, Let's use The Matrix — 73 as an example.
[@Rating]>=75,4, The LET function stores two named values:
[@Rating]>=60,3, FullStar and HalfStar.
[@Rating]>=45,2, FullStar uses a SWITCH statement to list a set of
[@Rating]>=30,1, thresholds. The first condition it passes is the third
0), — 73 is greater than or equal to 60. Therefore,
3 is returned.

HalfStar, HalfStar then uses the value of FullStar


to jump to 3 in its own SWITCH statement and
IF(
determine whether 73 is greater than or equal to
SWITCH( 65. It is, so IF's [value_if_true] is triggered to
FullStar, return a half-star.
5,[@Rating]<90, REPT then repeats the full star three times and
4,[@Rating]>=85, concatenates it to the half star.
3,[@Rating]>=65,
The star symbols are found in Insert > Symbols >
2,[@Rating]>=45, Symbol. Set the font to Segoe MDL2 Assets and
1,[@Rating]>=35, double-click on one to insert it. Be aware they
0,[@Rating]>=15, appear strangely in the formula bar because they
aren't official Unicode symbols. You don't have to
"½",),
use stars, however!

REPT("1",FullStar)&HalfStar
▶ Watch video ) Finally, you can also change their color using
the Font Color dropdown.
Tip #23

Fix incorrect Number formats are a way of telling Excel how to output data.
Although they don't affect the underlying values, they improve readability, consistency and make

percentages
analysis easier.
One of the 11 built-in choices is Percentage. It's designed for cells that contain percentages. However,
it can easily be misused due to how it behaves.

Firstly, it's important to understand that Excel stores percentage values as decimals 'under the hood'.
That means 25% is 0.25, 50% is 0.5, and 100% is 1. This isn't very reader-friendly, though, which is why
Percentage exists.
Assuming General, the default number format is the starting point; applying Percentage will multiply a
value by 100, which means two extra zeros are added, along with the same number of decimal places.
For example, 75 and 67 become 7500.00% and 6700.00%, respectively.

Not very sightly, eh?

This problem stems from:


▶ not setting the number format as Percentage from the start
▶ not inputting percentages in decimal format
▶ working with datasets that don't store percentages in decimal format

Also, as the per cent sign is often only included in headings and omitted from values, Excel does not get
the trigger it needs.
Thankfully, there are a couple of solutions, which both divide each value by 100.
As shown in the video, you can perform this calculation directly on your data using the Paste Special
window. Or, you can construct a formula in a separate column.

▶ Watch video
Counting the number of characters or words in a string is useful for a variety of reasons. You might be
conducting text-based analysis, language processing tasks, or planning social media posts.
Tip #24
In the example, a table houses a list of hotel reviews in A2:A18. How do we find the character and word
count of each one?

Count characters
CHARACTER COUNT
The LEN function returns the number of characters in a text string, so it's a straightforward task of
referencing the reviews range inside.

and words
=LEN(A2:A18)

WORD COUNT
The formula required is best understood broken down. Let's use the review in A2 for the example:
"The room was clean and comfortable."
1. In E2, use TRIM to remove any excess spaces from the string (there aren't any in this case).

=TRIM(A2)

The room was clean and comfortable.


2. In F2, use SUBSTITUTE to swap each space for an empty string, therefore removing all spaces.

=SUBSTITUTE(A2," ","")

Theroomwascleanandcomfortable.
3. In G2, subtract the character length of the string without spaces from the string with spaces.

=LEN(E2)-LEN(F2)

35 – 30 = 5
4. Add 1 to include the word after the final space.

=LEN(E2)-LEN(F2)+1

▶ Watch video Put together, this is the final formula for retrieving the word count of each review:

=LEN(TRIM(A2:A18))-LEN(SUBSTITUTE(A2:A18," ",""))+1
Tip #25

Hidden rows vs
Hiding rows and filtering tables are two common actions, but are you aware of their effect on
calculations?
Whenever you create a table, one of the first things you might want to do is add up a column's values

unfiltered rows
at the bottom. This is as simple as ticking the Total Row checkbox on the Table Design contextual tab.
Doing so adds 'Total' to the leftmost cell of the row and generates a SUBTOTAL formula in the rightmost.
If the column's data is numeric, it defaults to a function_num of 109 - SUM.
But hang on, in the argument's list of 22 options, there is also 9 - SUM.
What's the difference, then?
In short, 9 - SUM includes hidden rows in calculations, whereas 109 - SUM doesn't.
However, both exclude unfiltered values.
The video demonstrates this, with SUM featured first to show it is unaffected by either form
of row hiding.

=SUM(tblSales[Total])

Includes hidden rows


Includes unfiltered rows

=SUBTOTAL(9, tblSales[Total])

Includes hidden rows


Includes unfiltered rows

=SUBTOTAL(109, tblSales[Total])

Includes hidden rows


Includes unfiltered rows

▶ Watch video It's worth noting that the same rules apply to the other SUBTOTAL function_num options as well,
which also have two versions.
Which was your favourite
Exceleration guide?
Let us know!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy