0% found this document useful (0 votes)
76 views76 pages

Quora Excel Genius Compendium

Uploaded by

Zaid_Sultan
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)
76 views76 pages

Quora Excel Genius Compendium

Uploaded by

Zaid_Sultan
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/ 76

The

Excel Genius Compendium

Excel Tables Genius Page | 1


My Excel Genius
WELCOME Hello Excel Genius,
I’m sure you’ve already noticed, but
Quora is a great place to learn about lots
As simply as I can put it, mastering Excel
literally changed my life. I knew that no
matter what happened in my job, I had
of different and interesting topics,
including Microsoft Excel. developed in-demand technical & business
If you’re looking to become an Excel skills that I could transfer to any job in any
Genius, reading answers to interesting market.
and obscure Excel related questions is a - Mike Adams, Medium
great way to hone your knowledge.
I’ve collated the most popular Excel and There’s something for everyone here. I’m
VBA related responses in one sure you’ll pick up more than one tip
compendium so you can flick through it which will make you gasp “I didn’t know
at your leisure and expand your Excel Excel could do that!”
knowledge even further. Let’s go . . .

Excel Tables Genius Page | 2


How do you query a REST API with VBA in Excel? ..............................43
Table of Contents
Why does Excel select more than one cell when I click?....................46
Add +91 before a mobile number ........................................................ 4
How to Calculate Average while Ignoring Blank Cells ........................47
Write your own functions in Excel VBA ............................................... 6
How do you use Excel Professional not as a spreadsheet? ................48
How do I use the VLOOKUP Function...................................................... 8
What is the purpose of the Excel binary workbook format? .............49
Return Multiple Columns with VLOOKUP .......................................... 10
Determine a Prior Month Name from the Current Date ....................50
Show the History of a Cell's Changes ................................................. 11
How can I Calculate Fortnightly Loan Repayments? ..........................52
Is VBA in demand in 2020?................................................................. 15
Can I Delete every other Row on a Whole Spreadsheet? ..................54
How do I change VBA editor into dark mode? ................................... 17
The Insert Rows Option is Disabled ....................................................57
What is a more intuitive and easier to use alternative to Excel? ...... 19
What is the D function in MS Excel? ...................................................58
How do I learn macros and VBA? ....................................................... 20
How do you call a macro several times with different arguments?...59
How do I Find Merged Cells in a Workbook ....................................... 21
How do I replace #value with 0 in Excel? ...........................................60
How do you Make the Gridlines Darker? ........................................... 23
How can I prevent Excel Adding New Sheets? ...................................61
How do I Display the Heading of a Cell with the Largest Value ......... 24
How do I import up to 100 rows of data into Excel from the web? ...64
Do a VLOOKUP with Multiple Criteria ................................................ 26
How do I Transfer a UserForm Between Workbooks with VBA? .......66
Which Function Returns a Date After a Certain Month ..................... 28
How do I add a Floating Button or Icon to an Excel Workbook?........68
Which Industries Use VBA Coding Skills? ........................................... 29
How can the Shape of the Cell Comments be Changed? ...................70
How Many Worksheets can be Created in a Workbook .................... 30
How do I Check if Two Text Cells Match? ...........................................72
How do you Catch and Handle Errors in VBA? ................................... 32
How do I return the name of a sheet in a cell without using VBA? ...73
What are the Limitations of Recording a Macro in Excel? ................. 36
How can I earn money with Excel VBA programming? ..................... 39

Excel Tables Genius Page | 3


Topic Add +91 before a mobile number The Text Format Method
It sounds like you've discovered that when you start a value Excel cells (ranges) can have a wide variety of formats
Cell Formatting
with a plus-sign, Excel "guesses" that you're trying to enter a applied.
Question formula rather than a value. With this technique, you're going to tell Excel that anything
How do you add +91 This is because older spreadsheet applications, like Lotus 1-2- you enter into the formatted cells should be treated as text.
before a mobile number 3, used to start formulas with a "+" and Excel just mimics this Try this:
for the convenience of those users.
in Excel? 1. Select the cells you want to enter mobile phone
Meanwhile, here's four different methods you can force Excel numbers in.
to accept a "+" sign before a mobile (cell phone) number:
2. Display the Format Cells dialog (the short cut key is
The Apostrophe Method CTRL+1)
Start by entering a single-apostrophe and then enter the 3. From the Number tab, select "Text" in the Category
"+91". list and click OK.
The apostrophe tells Excel that what you're entering is just
text.
The Spaces Method
When you enter the mobile phone number, enter a space
first and then a space between each portion of the number.
So rather than entering this:
+91123456789
You would enter this:
+91 123 456 789
Note, the first character is a space.
Like the apostrophe method, the space forces Excel to treat
what you're entering as text.
Excel Tables Genius Page | 4
My Excel Genius
Now you can enter mobile number which begin with a plus-
sign.
The Custom Number Format Method
Not only does Excel support a wide variety of number
formats, you can also create your own.
You can tell Excel, that whenever you enter a number, to
make it start with "+91".

Try this:
1. Select the cells you want to enter mobile phone
numbers in.
Now you can enter mobile phone numbers, *without*
2. Display the Format Cells dialog (the short cut key is entering the "+91" prefix.
CTRL+1)
That is, simply enter "123456789" rather than
3. From the numbers tab, select "Custom" in the "+91123456789".
Category list. Give it a try !
4. In the box called "Type:" enter this custom number
format: +91000000000
5. Click OK

Excel Tables Genius Page | 5


My Excel Genius
Topic Write your own functions in Excel VBA Here it is:

VBA Yes, you can write your own functions in Excel VBA.
These can be used like a regular worksheet function or by
Question
other VBA code to perform specific calculations.
How can you write or Here’s an example . . .
create your own
functions in Excel VBA? Let’s pull it apart . . .
1. In this example, we’ve added a constant for Pi (3.142).
This is not necessary, but I just wanted to demonstrate
that your functions can also reference other values to
perform its calculation - even other functions.
2. This is the name of your function as well as any
This example has a function called coneVolume which information your function needs to perform its
calculates the volume of ice-cream cones (or any other cones calculation. These are called parameters. Notice that
for that matter) given the cone’s radius and height. each parameter has a name and a date type. (Tip:
It looks like any standard formula using a Excel worksheet What you pass to these parameters are called
function. “arguments”)

It starts with an equal sign, then the name of the function 3. This next piece may - or may not - be relevant to your
and parameter values (if any) between parenthesis. needs. Application.Volatile tells Excel to recalculate
your function every time any cell in your worksheet
When you write a function in VBA it’s called a User Defined recalculates.
Function, or UDF for short.
4. If you want your function to recalculate only when
Let’s take a look and the nuts-and-bolts of the coneVolume
inputs (parameters) to your function change, then
function in VBA, shall we?
leave this line out.

Excel Tables Genius Page | 6


My Excel Genius
5. Finally you have your actual calculation. Notice that
the result is assigned to the name of the function. This
tells VBA to pass the result back to whoever called this
function.
There’s a whole lot more you can do to write your own
functions using Excel VBA. If you’re interested, there’s more
you can read about here.

Excel Tables Genius Page | 7


My Excel Genius
Topic How do I use the VLOOKUP Function
Functions Excel’s VLOOKUP function allows you to find and retrieve
(that is, “lookup”) the value of a cell from a range of cells.
Questions
The “V” in VLOOKUP stands for Vertical. This is because it
What is the function of expects the list you want to look in is vertically structured.
1) find what
vlookup and please how There’s also a HLOOKUP function which works with
The first argument is asking what do you want to find or
do I start as a beginner.. horizontally structured lists.
“look up”?
Any useful links will be The format of the VLOOKUP function has the name of the
function and 4 input values called ‘arguments’. VLOOKUP works by looking up this value in another range of
very much appreciated? cells and bring back another value for you.
Here’s the format they take:
2) where is it?
That is, where is the range of cells (or table) that has the
value you want to find?
The names of some arguments - like “table_array” - aren’t
very friendly. There’s a catch here. The value you’re looking for must be in
the first column of the table where you’re looking for it.
Also, notice how the last argument has square brackets
around it? 3) which column do you want?

The square brackets means this argument (or input) is When VLOOKUP finds the value you’re looking for, you want
optional. You don’t have to provide a value if you don’t want. it to get a related value in that same table.
But if you don’t, Excel assumes what the value will be (more This arguments is asking which column has the value you
about this in this in a minute). want in the range it’s searching.
Rather than the cryptic argument names in the image above, 4) how precise?
let’s change the wording of these arguments to something VLOOKUP gives you the option of searching for an exact
more friendly and discuss each one. match or an approximate match.

Excel Tables Genius Page | 8


My Excel Genius
If you don’t tell VLOOKUP which one you want (remember, Let’s pretend you have a shop.
this argument is optional) then Excel assumes you want an When a customer buys something you give them a discount.
approximate match. The discount they receive depends on how much they buy:
Let’s look at a couple of examples so you can see the
difference between the two.
VLOOKUP with an Exact Match
In this example, we have a list of people with their gender
and age.

The VLOOKUP formulas says: “Go and find 6,500 in the range
B3:C6 and where 6,500 does not exceed the Sale value bring
back what’s in the second column.”
In this example, VLOOKUP would bring back 5% as 6,500 is
more than 5,000 but less than 10,000.
In cell G4 you can see our VLOOKUP function.
The VLOOKUP formulas says: “Go and find ‘Goofy’ in the
range B3:D6 and bring back what’s in the third (3) column
and I don’t want (that is, FALSE) an approximate match.”
In this example, VLOOKUP would return 24.
If VLOOKUP could not find Goofy in the list, it would return
#N/A.
LOOKUP with an Approximate Match
So when would you want to use an approximate match?

Excel Tables Genius Page | 9


My Excel Genius
Topic Return Multiple Columns with VLOOKUP If you want to return multiple values to a single cell, the only
way I can think of is by having several VLOOKUP formulas and
Functions This was a follow-on question in the comments from the
concatenating the results, like this:
previous VLOOKUP question.
Question
What if you want multiple Yes, you can return multiple columns. The technique to do
columns returned? Do that is to list each column you want returned in braces (curly
you put that in brackets? brackets) like this:
And if the formula is in
say, C2, but you want the As a final tip, Excel also displays a ‘prompt’ below the
columns C, D, & E function name when you enter it in a cell. This is good to jog
returned, should you put the memory as well
the formula in E2?
Is that something that can But . . .
be done? . . . the results are split across multiple cells (one for each
value returned) like this:

Note the blue border around cells G4:H4 as Excel emphasises


that these values belong together.

Excel Tables Genius Page | 10


My Excel Genius
Topic Show the History of a Cell's Changes
Worksheets I’ve got good news and bad news.
Let’s start with the good, shall we?
Question
Another poster was correct to say that Excel has cell-level
How can you show the auditing which records cell changes in a comment.
history of a cell's changes However, this feature hasn’t been removed, it’s just been
in Excel? For instance, I hidden.
put in the price of This is because the Track Changes feature depends on Excel’s Voila.
oranges as $1.00 Shared Workbook functionality.
Now, to track the cells changes, do this:
yesterday, but today I had Microsoft is now discouraging Shared Workbooks in favour of
to change that to $1.50, the new co-authoring functionality. 1. Click the Track Changes button and choose Highlight
Changes.
and I don't want to forget If Track Changes is suitable for you, you can add it back to the
ribbon by going to the File menu and selecting Options. 2. Check (tick) the option for Track Changes while
that I had them at $1 and
editing.
I can't add another From there. . . .
3. Click in the Where box and then select (highlight) the
column. 1. The down the left-side, select Customize Ribbon.
cells you want to track (audit).
2. Then from Choose Commands from select All
4. Click OK.
Commands (no point doing things by halves, ay?)
3. Scroll down the list of command until you can find
Track Changes.
4. You can add it to the Review tab (or any other tab for
that matter) but you’ll need to add it to a new group.

Excel Tables Genius Page | 11


My Excel Genius
You’ll then be prompted to save the workbook. Note also that while a workbook is shared you can’t view (yet
When you change a value, Excel will enter a special comment alone edit) any VBA code in the workbook. WTF?
(not the standard comment with a red triangle at the top-right 2. One Shot Wonder
corner of the cell) showing you last prior value.
For me, the biggest negative is that Track Changes only
records the last change. There’s no history. I can’t see what a
value was 2 weeks ago, or the fact that Fred changed in last
Thursday (you get the idea).
Track Changes with VBA
Here’s an alternative which provides the same functionality
with the following characteristics:
• You can log cell changes in each cell’s respective
comment
• You can keep an ongoing audit trail (yeah, baby)
Pretty nifty, huh?
• You do not – repeat, do not – have to share the
Okay, the party’s over. Now let’s have a heart-to-heart about
workbook
the bad news.
• You can still access and edit any VBA code in the
I think this approach kinda sucks for two main reasons (let
workbook.
me know if you think of any others).
I think we’re on to a winner here. You with me?
1. Shared Workbook
Good.
I confess, I hate shared workbooks in Excel. In 20 years,
they’ve given me nothing but headaches.
The Track Changes feature is based on Shared Workbooks,
hence Microsoft is trying to <cough> ‘encourage’ you to use
co-authoring instead.

Excel Tables Genius Page | 12


My Excel Genius
Let’s say you had a spreadsheet that looked like this: Let’s see what it’s doing . . .
(1) First the routine accepts the cell you want to audit (as a
range object we’ll call Target).
(2) We don’t want to add an audit comment to any old cell,
so we’ll use the Intersect method to confirm the Target cell is
in the range of cells we want to track.
You can change the Range to whatever’s relevant to you.
(3) Here we build up the details we want to record. Add what
you like: user name, time, wind direction. Whatever.
(4) If the Target cell doesn’t currently have a comment, add
Every time you changed a sales number, you wanted the one with our details. Simples!
value recorded in a comment with the cell that changed.
(5) If the Target cell already has a comment, add the new
Note that the sales figures are in cells D3:D14.
details at the beginning of the comment (so the most recent
Now we need some VBA code to provide an audit trail for us. change is at the top)
Here’s one example: (6) What the heck, let’s change the height and width of the
comment, so the audit trail is easier to read.
Now we need a way to trigger this code.
Worksheet events to the rescue.
In the Visual Basic Editor (VBE) double-click the sheet you
want to track.

Excel Tables Genius Page | 13


My Excel Genius
(1) From the list of Objects, select Worksheet.
(2) From the list of Events, select Change.
(3) In the code stub, call our new routine and pass along the
cell which changed, called Target here.
Now go and change some of the cell values in the range
we’ve designated.
You should see an audit trail something like this:

Excel Tables Genius Page | 14


My Excel Genius
Topic Is VBA in demand in 2020? 2) As an employee of a large company
I assume you are asking because you’re either interested in Over the years I have witnessed many employees performing
VBA
learning VBA or wanting to know what work opportunities mundane, repetitive tasks in a Microsoft Office application
Question there are with VBA skills and experience under your belt.. (especially Excel).
Is VBA in demand in Here’s my take on it as a freelance VBA developer for over 20 This is boring, slow and prone to error. Many of these tasks
years . . . could be automated.
2020?
Perhaps the first thing to recognise is that the demand for Being able to automate these tasks not only reduces
Side Note operational risk, but increases your productivity, makes you
professional VBA developers in the corporate sector has been
A variation of this in decline for about a decade. more valuable to your employer and allows you to focus on
more interesting work.
question comes up Alternatives tools such as Python and R are commonly used
regularly on Quora. Rest in replace of or in conjunction with regular Excel and VBA 3) Banking & Finance
assured, VBA is not going development. Banking & Finance is still a huge user of Excel spreadsheets.
anywhere. Having said that, there are still opportunities. While VBA has lost some of its share to languages such as C#
There are still several areas in which VBA skills can be and Python, there is still work in this sector.
While Microsoft now
applied. These include: This will probably be the hardest sector for you to enter for
places more emphasis on two primary reasons:
1) Small & Medium Size businesses
other technologies, VBA First, there are geographical limitations. VBA development in
These are the type of businesses which do not have full time
will be available in Excel developers. finance is focused in the financial centres around the world
for decades to come. such as New York, London, Singapore and Hong Kong.
However they still need software solutions which off-the-
Excel still supports XLM shelf products do not satisfy or they prefer not to work with The second is you will be competing with people (like myself)
freelancing websites. who have many years experience in this area.
macros which were
superseded by VBA 30 For example, I have developed VBA solutions for engineering,
years ago! construction and retail businesses.

Excel Tables Genius Page | 15


My Excel Genius
4) Other Opportunities
There are other opportunities where the job title may not be
“VBA Developer” but are enhanced by VBA skills. These
include Data Analysts, Business Analysts and Technical
Analysts.
Yes, I know there are alternative technologies including big
data (Hadoop etc), Python and R. However, many companies
simply do not allow business staff to install “development
software” on their computers.
Meanwhile if you have Microsoft Office (or just Excel)
installed, VBA is already there.

Excel Tables Genius Page | 16


My Excel Genius
Topic How do I change VBA editor into dark mode? So, if you really, really want to go to the dark side with the
VBE, try this . . .
VBA I gather from the question you're looking for an option to
change the "Colour Theme", which is available in many code In the VBE from the Tools menu choose Options.
Question editors like this example from Visual Studio Code: From the Options screen that appears (below) select the
How do I change VBA Editor Format tab.
editor into dark mode?

If that's the case, then I've got some bad news and something
else resembling good news
VBA’s Visual Basic Editor (a.k.a. the VBE) doesn’t have a
theme option.
But it does have some (basic) capability to change the colours You’ll need to select the Code Colors one at a time and
of the module and code within a module. change the Foreground, Background and Indicator colour for
Here’s a (rather ugly) example . . . each code colour.
A little tedious, I know, and you’ll probably need to
experiment a little to get the “look” you’re after.
I’m not aware of any means to automate this or save (and
reapply) the settings.

Excel Tables Genius Page | 17


My Excel Genius
I prefer to stick to the default colours. 5. From the Indicator dropdown, select ‘Auto’.
But if you want to be adventurous, you can achieve this kind You now want to repeat this process for each of the colour
of effect: choices below:

If you do decide you’d prefer to code VBA on the ‘Light Side’,


here’s the colour scheme so you can change it back:

Let’s change the colours so it look like the proper VBA code in
Excel’s Visual Basic Editor screenshot above.
1. If it’s not currently open, open the Visual Basic Editor
and display the Options screens. In the VBA Editor,
from the Tools menu, select Options and then select
the Editor Format tab. The whole process is a little tedious, I know, and you’ll
probably need to experiment a little to get the “look” you’re
2. In the list of Code Colors, select ‘Normal Text’.
after.
3. From the Foreground dropdown list, select ‘Yellow’.
4. From the Background dropdown list select ‘Black’.

Excel Tables Genius Page | 18


My Excel Genius
Topic What is a more intuitive and easier to use It’s left VisiCalc, Lotus 1–2–3 and Quattro Pro (amongst
others) in the dust.
Productivity alternative to Excel?
With around a billion users world-wide, there’s an enormous
How about this?
Question support base.
What is a more intuitive Any Excel related topic you can think of - no matter how
trivial or complex - has been extensively been documented in
and easier to use
a variety of formats from blog posts and books to step-by-
alternative to Excel? step YouTube videos.
Which parts of Excel are you not finding easy or intuitive?
Feel free to ask here or perhaps search YouTube.

It’s intuitive.
It’s really easy to use.
Darn, if you can use a calculator you can . .
. . oh.
Okay, silliness aside, with a 34 year heritage, Excel is about as
intuitive and easy (yet incredibly powerful) a spreadsheet
application you’ll find.

Excel Tables Genius Page | 19


My Excel Genius
Topic How do I learn macros and VBA? You just need to find the right resource (book, video, course)
that works for you.
VBA This was a follow on question in the comments of the earlier
‘intuitive and easier’ question. If you spend all day in Excel, learning VBA is the ultimate
Question productivity hack.
The one thing I find is not I literally started with this book (the ‘Dummies’ book of it’s
intuitive is VBA. I'd really time) although I’ve read many more since. This book did just
like to learn this and as the title suggested, taking you though the basics of VBA
macros but like learning a for Excel, step-by-step..
foreign language, this I now make a living out of it
takes patience I just don't
seem to have.

(yes, that really does say Excel 5)


The basics of VBA, the language itself, is not really that
complicated.
Excel Tables Genius Page | 20
My Excel Genius
Topic How do I Find Merged Cells in a Workbook From the Format dialog, select the Alignment tab (if it’s not
already selected). Then check (tick) the Merge Cells option
Formatting Merged cells can be a major PITA (Pain In The Whats-it). If
and click OK.
you can find an alternative approach, you’ll be happier in the
Question long run.
I am quite adept at using Having said that, to answer your question, yes; there is a way
Excel, however, does to find merged cells.
anyone know of a way to Here’s an example of a worksheet with some randomly
find merged cells other merged cells. I’ve formatted them a beige(ish) colour so they
stand out.
than looking for them by
hand? Edited: I originally
said split, I meant
merged, more coffee
needed.
This returns you to the Find and Replace dialog.
Now simply click Find Next and you’re off to the races. Yee-
To find merged cells, try this:
Hah!
On your keyboard, press CTRL+F to display the Find and
Replace dialog and then click the Format option.

Excel Tables Genius Page | 21


My Excel Genius
Meanwhile, if you click Find All, Excel will display a list of all
merges cells in your worksheet.

If you really want to be thorough, from the Within option


select ‘Workbook’ and then click Find All. Excel will present a
list of all the merged cells in your entire workbook.
Note that it only shows the cell address of the first cell (top-
left) in each merged group of cells.

Excel Tables Genius Page | 22


My Excel Genius
Topic How do you Make the Gridlines Darker? 5. options for this worksheet. Select the worksheet you
want and . . .
Formatting Many answers suggested formatting (colouring) the borders
of cells.
Question
There’s several problems with simply formatting the borders
In Excel, how do you if your intent is to have standard grid line colour applied to
make the gridlines the whole worksheet.
darker? 1. When you copy & paste from another worksheet that
doesn’t have the same border colours, it will replace
the coloured borders (unless you Paste Special every
time).
2. The file size will be slightly larger (okay, it’s very
marginal but it can add up) 6. select the gridline colour
3. Scroll performance can be affected In large, complex 7. Note that the gridline if effectively a dotted line so the
or highly-formatted worksheets. colour wont be really, really dark.
What’s the alternative? To demonstrate that it’s actually working, here’s the same
technique in Magenta:
Excel has a feature specifically for changing the grid colour of
worksheets
Here’s the steps to make the gridlines darker:
1. From the File menu . . .
2. select Options
3. then select Advanced
4. scroll down the list of Advanced options until you
see...

Excel Tables Genius Page | 23


My Excel Genius
Topic How do I Display the Heading of a Cell with the You can use the MAX function to find the largest value like
this:
Formulas Largest Value
Question From what I understand, you’re trying to achieve this result:
I have a table where I have
different values in which if
they are summed up, it will
equal 100. Different values
have a corresponding label Note that the formula in rows 10 and 11 are identical. I’ve
and whatever is the biggest copied it over two rows so you can see the formula and result
value, the corresponding Whichever mineral has the highest (percent) value, display in one image.
the name of that mineral.
label to that maximum value Now that you know “what” the biggest value is, let’s find out
will appear on another cell. Here’s how we got that result: “where” (in the list) that biggest value is.
The data is like this: The MATCH function does just that for you. The MATCH
function will tell you the position of a value in a list.
Mineral: ____________
Components:
Clay = 25
Feldspar =55 Whew! There’s a lot going on there. An INDEX, MATCH and
MAX function all rolled into one.
Quartz = 20
Let’s take it one step at a time, shall we?
If one of those components The first thing (argument) you need to tell MATCH is what
will be the maximum value, You mentioned you want to know the name of the mineral value you’re looking for. In this example, we’ve the result of
which has the largest percent. So the first thing we want to the MAX function. You then tell MATCH where the list is
then its label will appear
know is: “What is the biggest value?” (C7:C9 in our example) and finally what kind of match you
after the “mineral:” cell.
want.

Excel Tables Genius Page | 24


My Excel Genius
Because you want an ‘exact’ match, we’ve entered ‘0’ as the
last argument.
As you can see in the example above, the MAX value (of 55)
is the 2nd value in the list.
Okay, now you know what the maximum value is and where
that value is in the list. Now we want to find what the 2nd
mineral in the list is.
For that, you can use the INDEX function.
While MATCH tells you where (the position) a value is, INDEX
tells you what a value is (given the position.

The INDEX function says, in a given list (B7:B9 in our


example), what is the position of the value you want?
The position is the result of the last formula. So here, we
enter the last formula as the position argument of the INDEX
function.
As you change the percent values, the formula will
automatically tell you which mineral has the largest percent:

Excel Tables Genius Page | 25


My Excel Genius
Topic Do a VLOOKUP with Multiple Criteria You can create a key by combining the values of one or more
cells in your list like this:
Formulas That’s a great question as it’s a very common problem people
encounter using VLOOKUPs in Excel. They often need to
Question perform a lookup based on more than one criteria.
How do I do a VLOOKUP For example, imagine you had a table like this from which
with multiple criteria? you wanted to lookup an employee’s salary.

This key is nothing fancy. Just the concatenation of First and


Last names using the ampersand symbol (you could also use
the CONCATENATE function).

While cell I3 has a salary value for Minnie, you can see we Your VLOOKUP would now look like this:
have more than one Minnie in our list. We also have several
employees with common first or last names.
But the way VLOOKUP works, it will retrieve the first
matching item in our list.
Here’s one way to work around this.
Create a Unique ‘Key’
You aim to create a value that is unique in your list. A ‘unique
identifier’ or ‘key’.
In this example, you could try a combination of ‘First Name’
and ‘Last Name’.
Here’s how it might work . . .

Excel Tables Genius Page | 26


My Excel Genius
Rather than looking up the value of a single cell, you would That way, if you’ve only entered one of the lookup values,
lookup the combination of two cells. but not the other, the formula will return a blank (that’s two
In theory you could use more than 2 cells to build your key, double-quotes at the end of the formula.
but then it may start to get a little messy. You may be better Or you could get the formula to display a helpful message like
off looking for a more natural unique value. this:
In this example, that may be an “Employee Id”.
One other thing to remember . . .
Because you are now using multiple cell values to define the
key to lookup, if you haven’t entered a valid value in both
cells, the VLOOKUP will return a nasty error value like this:

So if you want your spreadsheet to appear ‘cleaner’, you can


wrap you VLOOKUP up in a IFNA() function, like this:

Excel Tables Genius Page | 27


My Excel Genius
Topic Which Function Returns a Date After a Certain One nice feature of this function, is that the months
argument works in both directions. That is, you can use it to
Formulas Month
find a date in the past as well as the future.
Excel has quite a few useful functions for working with dates.
Question To do that, simply make the number of months negative, like
From what I understand, you want to take an existing date, this:
Is there any function in and find out what the date will be 36 months in the future.
Excel to turn a specific Here’s an example of how to achieve that using Excel’s EDATE
date into a certain month function:
later?
For example, "01.12.2021
Effectively, the EDATE function now says; “tell me the date
+36 (month) => 36 months before the Start Date”.
01.12.2024".
Let’s pull it apart, shall we?
The EDATE needs two pieces of information (arguments) to
determine a date in the future.
The first is the Start Date. In your example, that’s
‘01.12.2021’.
I’m not sure if that means, 01-December or 12-January. Given
I’m in England I assumed a UK date format. This function will
work either way.
The second piece of information is how many months away,
do you want to know what date it will be.
In your example, that’s 36. So, it will be 01-Dec-2024 in 36
months from 01-Dec-2021. This will automatically take into
account Leap Years. Sweet!
Excel Tables Genius Page | 28
My Excel Genius
Topic Which Industries Use VBA Coding Skills? Other industries in which I’ve see a demand for VBA
development work (but have not worked myself) include:
VBA I see you’ve got a background in the finance sector, so you
probably already know the answer to your question • insurance
Question
I’ve been a professional freelance VBA developer for over 20 • pharmaceuticals
Which industries would years. I’ve done VBA development work across a broad range • accounting firms
find VBA coding skills of industries including:
The caveat here is that the vast majority of this has been VBA
most relevant? • national retailers within Excel although I’ve done my fair share in Access,
Side Note • industrial manufacturers Word, Outlook with a smidgen of PowerPoint.

This question was asked • an international car manufacturer


by someone who, based • government departments
on their profile, worked • corporate legal departments
or was familiar with the • a patent attorney
financial services
• utilities companies
industry.
• national FMCGs (Fast Moving Consumer Goods)
• national hardware suppliers
• small businesses, and
• mortgage brokers
But I've spent most of my VBA development time working in
trenches (front office) in the banking and finance arena.
Mainly investment banks, but also asset managers, retail and
institutional banks.

Excel Tables Genius Page | 29


My Excel Genius
Topic How Many Worksheets can be Created in a But . . . if you right-click the arrows, Excel displays the
Activate dialog (below).
Worksheets Workbook
I’m pretty sure Excel doesn’t have a fixed limit on the number
Question
of worksheets you can create in a workbook other than the
How many worksheets limited imposed by the “available memory and system
can be created inside an resources” of your computer.
Excel workbook? The largest number of worksheets in a single workbook I’ve
encountered was about 160.
If you are intending to create a workbook with lots and lots
of worksheets, the first problem you’ll encounter will not be
hitting a worksheet limit.
The problem you will encounter before hitting your
computers memory limit is navigation.
Simply select the sheet you want to go to, click OK and you’ll
Navigating around a workbook with dozens of worksheets,
be teleported there! Woo-Hoo.
let alone hundreds is a task unto itself. Don’t underestimate
it. The Activate dialog is fine for a handful of worksheets, but it
has some limitations:
If you’re planning a workbook with a lot of worksheets, you
may want to consider of people using the spreadsheet are The worksheets are listed in order of sequence and you can’t
going to navigate around it. sort it (alphabetically, for example).
Here’s some suggestions . . . Your worksheet names may not reflect the purpose of the
sheet, so may not be useful for navigation.
Activate Dialog
To the far left of the worksheet tabs in your workbook, you’ll
see to navigation arrows. These let you select the worksheet
to the left or right of the current worksheet.

Excel Tables Genius Page | 30


My Excel Genius
You can’t filter the list looking for a specific worksheet name. Navigation Tool
Bummer. You could also create a more generic navigation tool like this
Hyperlinks example.
You can also create hyperlinks in your workbook to navigate
from one sheet to another.
Depending on how many worksheets you have, this can get
messy pretty quickly.
Custom Menu System
You can also create a menu system to help users navigate
their way around your workbook.
Here’s an example of one template I produce which used a
custom menu down the left-hand-side of the screen. This
allowed users to navigate quickly to various worksheets in a
structured and consistent way.

This example doesn’t have the ability to sort or filter the list
of worksheets, but that could easily be added.
There’s probably quite a few other ways you could add
navigation to a workbook with many worksheets (custom
ribbon tab perhaps?) but these suggestions may provide
some ideas.

Excel Tables Genius Page | 31


My Excel Genius
Topic How do you Catch and Handle Errors in VBA? Not much fun
VBA With an error handler, you’re telling VBA that if an error does So let’s add in an error handler.
occur, it should jump-to and run a section of code which will You start by adding an instruction at the top of your routine
Question address (or handle) that error. or function which tells VBA where it should go in the code
How do you catch and Here’s a simple example: should an error occur, like this:
handle errors in Excel
VBA?

Here you have two variables, x and y, of different data types.


The code then tries to divide x by y and assign the result to z.
As it doesn’t make sense to divide a number (x is a single) by
text (y is a string), we’ll get the following error: The line we’re interested in is
On Error GoTo ErrorHandler
This tells VBA to jump to the section of code which starts
with the label ErrorHandler:.

Excel Tables Genius Page | 32


My Excel Genius
In reality, you can call this label anything you like, but I If you were writing a function, you’d have:
always use “ErrorHandler”. It’s obvious what it’s for and it’s Exit Function
one less thing I have to think about.
The other thing you may have notice is the constant
Near the end of this routine you can see the label: declaration at the top of the routine:
ErrorHandler: Const ProcName As String = "DoSomeStuff"
Everything after “ErrorHandler:” is your error handling code. The constant ProcName (short for “Procedure Name”) is later
In this case, we just have a message box. If you ran the code, used for the Title of the message box.
the message would look like this: This is not mandatory, but if you implement error logging -
that is, recording the details of each error somewhere like a
text file or database - it will allow you to track exactly where
the error occurred.
Making Error Handlers Useful
As we discussed, the message in our error handler is not
much more useful than the VBA generated version.
So as the VBA programmer, you’re in control of how this
It’s prettier than the VBA generated message but not much plays out.
more useful (more on this in a moment).
Here’s two approaches.
Things to Notice
Get Defensive
Here’s a couple of things to notice. Just before the
“ErrorHandler:” label you need to ensure you exit the routine The first line of defence is to try to avoid errors happening.
or function, otherwise VBA will continue executing the code In your code you could check to ensure the values you’re
and run the Error Handler every time. working with are valid and warn the user if they’re not.
In this example, we’ve used:
Exit Sub

Excel Tables Genius Page | 33


My Excel Genius
Something like this:

In this example, you’re checking the data type of x before you


perform a calculation against it. In this way you prevent an
error before it can happen. Here you check if the error number 13 (Type Mismatch) and
Having said that, no matter how defensive you get with your if either value is not a number. Is so, display a special
coding, errors can still occur. So here’s two more message. If not, just display the generic error message.
considerations This error handler would show this message when the same
Make Error Messages Meaningful error occurred:
The first is to make your error messages more meaningful.
Type Mismatch isn’t going to make much sense to most
users. So something more meaningful or constructive may
help, like this:

Not perfect, but better than the prior version

Excel Tables Genius Page | 34


My Excel Genius
Log Your Errors As you can see, it captures the name of the module and
Finally, a suggestion. routine, all the way down to the line number where the error
occurred.
No matter how “user friendly” you make your error messages
most people just don’t read (or remember) them. This provides enough detail to make a meaningful analysis. I
can’t tell you how many times it has saved my bacon having
So the next best thing you can do is save the details of the these details available.
error somewhere. That is, log the errors.
In production code I write, error details get saved to a central
error log. This could be a text file or a database.
Your error log should capture as much detail as you can.
Here’s an example of my standard error log:

Excel Tables Genius Page | 35


My Excel Genius
Topic What are the Limitations of Recording a Macro The Macro Recorder doesn't pay attention to which option(s)
you selected.
VBA in Excel?
Instead it just notes down the value of each attribute
The VBA macro recorder in Excel is indeed a handy-dandy
Question (property) in the dialog (yeah, lazy, I know).
tool.
What are the limitations This is the VBA code it would have recorded:
For a beginner, it’s a useful place to start learning about VBA.
of recording a macro in Even for seasoned VBA developers it’s handy to quickly
Excel instead of writing it record an action when you’ve forgotten the syntax for it
with VBA? (PivotTables comes to mind).
But there’s many important things you cannot achieve by
recording a macro in Excel.
This means you must roll up your sleeves and write the VBA
code yourself.
Here’s a few of them . . .
The State of Dialog Boxes
Let's say you're recording a macro to format some cells.
Pretty verbose, huh? TintAndShade? You didn’t order that!
You want some cells to be formatted italic, so you display the
Format Cells dialog, select Italic and click OK. There’s a lot of stuff in there you didn’t do, don’t care about
and probably don’t want
Perhaps all you really wanted was this:

Excel Tables Genius Page | 36


My Excel Genius
Writing this (rather than recording) would produce far more It would make sense to have one standard routine, and then
succinct code. repeat it for each worksheet.
Nota Bene: It will also run faster. VBA allows you to repeat tasks through loops such as FOR
The Macro Recorder Can't Make Decisions EACH, DO WHILE and DO UNTIL:

Pink or Blue?
Chocolate or Vanilla?
Less than 3.142 or more than Pi?
If you need to make any decisions in your process (code), the
macro recorder can't help you make them. But the macro recorder can't do this.
VBA has several ways to branch logic (make decisions) such I hate to sound like a broken record (okay I am repeating
as the IF statement (let's not forget IIF) and SELECT CASE: myself), but if you want any task performed multiple times
(without repeating the code) you're going to have to write
those loops yourself.
The Macro Recorder Can't Message You
Sometimes you'll want to prompt the person using your
spreadsheet (that person might be you).
That prompt might be a confirmation that a process has
But none of these can be recorded. finished:
You'll need to write them manually yourself.
The Macro Recorder Can't Repeat Itself
Sometimes the task you want to do is pretty simple.
Maybe copy some cells from one location to another. Maybe
you need to perform (repeat) this across multiple
worksheets.

Excel Tables Genius Page | 37


My Excel Genius
Or it may be a question: None of this can be recorded.
You’ll need to design the UserForm manually (or write code
to automate it) and then write all the VBA to handle button
clicks and all the tasks that should be performed.
Where’s the Remote Control?
Using VBA you can have one application control another
Either way, the macro recorder can’t display messages to application.
either inform or prompt your users. The process of controlling one application from another is
Again, you’ll need to write the code for that yourself. called Automation.

What? No UserForms? You’d be surprised what you can achieve via Automation.

One way your Excel applications can interact with its users is For example, you could have an Excel application “tell”
via a screen or UserForm. Microsoft Word to create an invoice using values in an Excel
spreadsheet and then attach the invoice to an email in
Here’s an example: Outlook.
You’ve probably already guessed by now, and you’d be right -
automating one application from another cannot be done
using the macro recorder.
To make all the Microsoft Office application sing-and-dance
together, you’ll need to write the VBA code yourself.

Excel Tables Genius Page | 38


My Excel Genius
Topic How can I earn money with Excel VBA If you want to do VBA work for small business (more on this
in a minute) you can employ MS Access.
VBA programming?
But if you want to do VBA development work in the
I’ve been earning a 6-figure income primarily as an Excel/VBA
Question corporate world, you’ll want experience with an industrial-
developer for some 20 years.
strength database such as SQL Server or Oracle. This includes
By using of Excel VBA So yes, it is possible to make a living (and a very good one) the ability to write stored procedures.
programming, how can I with VBA.
Work on Your Domain Knowledge
start to earn money? Now for the obligatory caveats :)
However, your technical skills are only half the story.
The Number of Opportunities
The other half will be your domain knowledge.
There are far less opportunities where the job title is “VBA
By this I mean developing knowledge and skill in a specific
Developer” than there were say, 10 years ago. Sure, they still
industry sector or niche that makes you more valuable in that
exist but they’re focused in specific industry sectors and
sector. Even within banking & finance, I focused on a sub-
geographical locations (we’ll get to that in a minute).
niche.
You’ll Want Complementary Skills
I picked finance for several reasons. One is that the industry
If you wanted a job as a web developer, you’d be hard pays well.
pressed to find something paying well with HTML skills alone.
The other is that they invest in technology in order to stay
Nowadays you typically need to be a “full stack” developer to competitive. The last I investigated, banking & finance spent,
command good rates. on average, 3 times as much on IT as almost any other
The same principle applies with VBA development. industry.
You’ll really want to enhance your VBA with complementary So, where are the VBA Opportunities?
technologies such as Python and C#. Ironically, while C# and From what I can see, there are three primary areas in which
VB .Net compile down to basically the same IL code, VB .Net you can earn good money with VBA.
pays far less than C#.
As of today, there are still opportunities in the finance
You’ll also can’t avoid databases, usually relational, but also industry or providing VBA consulting and development
others. This includes the ability to read and write SQL. services to small and medium business.

Excel Tables Genius Page | 39


My Excel Genius
So, your targets are: For example, I’ve done a lot of work in fixed income,
regulatory capital and risk (main market risk and credit risk).
• Banking and Finance
The other restriction being a VBA developer in finance is
• Freelance Consultant
geography.
• Jobs which involve VBA but are not VBA developer You really need to be in a major financial hub such as New
jobs (e.g. Data Analyst) York, London, Singapore and Hong Kong.
But what about freelance platforms? (in a post-COVID world, this may be less relevant. I’ve been
I’ve excluded the many online freelancing platforms such as working as a VBA contractor for large financial institution in
upwork as I suspect the majority of the VBA developers there London for the last year. Apart from the initial interview, I
do not earn a substantial income (if anyone has evidence to have never stepped inside the office).
the contrary, please let me know). Freelance Consultant
Banking & Finance There are many small-to-medium enterprises who need
I've spent most of my Excel & VBA development time working solutions that off-the-shelf software doesn’t address.
in trenches (front office) in the banking and finance arena. They often don’t have their own IT department yet still have
Mainly investment banks and asset managers but also retail business problems that need solving.
and institutional banks.
Therein lies the opportunity.
The roles pay well.
I’ve known of some VBA developers who focused on a
Some of them, very well. specific industry niche.
But they have barriers to entry. One is domain knowledge as I This not only enhanced their credibility as an authority in that
mentioned before. niche but enhanced their profitability as they could
While you don’t need to have a finance related degree, you streamline their development and processes.
will be expected to have an understanding of the specific
area in finance you want to works as a VBA developer.

Excel Tables Genius Page | 40


My Excel Genius
I’ve done VBA development work for a broad range of
industries including:
• national retailers
• industrial manufacturers
• an international car manufacturer
• government departments
• corporate legal departments
• utilities companies
• national FMCGs (Fast Moving Consumer Goods)
• national hardware suppliers
• small businesses, and
• mortgage brokers
The opportunities are out there - you need to go and find
them.
Permanent Jobs
There are still opportunities in the permanent job market as
these screen shots show.
The first is from JobServe and the second is from
eFinancialCareers (both UK based).

Excel Tables Genius Page | 41


My Excel Genius
Two things to note: both relate to the UK market (London
specifically) and nearly all the VBA job opportunities are in
finance.
You’ll need to look at what is available in your local market,
but as mentioned, well paying VBA jobs in finance have a
geographical limitation.
These screenshots were taken on Sunday, 07-Apr-2019.
Non-Developer Jobs Involving VBA
If all this seems too daunting, another alternative is to look at
job (contract or permanent) where the job title is not VBA
Developer but is enhanced by VBA skills.
This includes Data Analysts, Business Analysts and Technical
Analysts. Many of these pay quite well.
Be a Freelancer not an Employee
If you want to make a good living with VBA, you’ll also want
to be a freelancer not an employee. By freelancer I mean a
contractor or consultant who is self-employed.
Contractors not only command a higher rate than employees,
but they also have more control than employees over their
taxes.

Excel Tables Genius Page | 42


My Excel Genius
Topic How do you query a REST API with VBA in Excel?
VBA You’ve got several approaches available. We’ll look at a clean
and simple approach here.
Question
One other consideration when you query a REST API is what
How do you query a REST format the data will be returned in. The two most common
API with VBA in Excel? are JSON and XML.
We’ll also look at how to parse your JSON ’cause that can be
Side Note
a PITA.
I’ve answered this The approach, we’ll cover here uses a reference to an
question (although external library (see VBA is extensible! )
phrased differently) The first thing you’ll need to do is set a reference to the
several times on Quora. It Microsoft XML parser library in the Excel Visual Basic Editor
seems to be a topic of (VBE): So, what’s it doing?
great interest to anyone You should find the Microsoft XML library in the list of 1. The first couple of lines declare some constants to
trying to extract data References. make the code easier to read and avoid including any
Once you’ve done that, in a new module, enter the following “magic numbers”.
from the Web via VBA.
VBA function. 2. You then declare a variable as the Microsoft XML
You can see it accepts a web URL as an input parameter and parsing library and instantiate it.
will return some text (as a string). 3. Next, you’ll open a connection to the webservice with
the URL, request that the data come back in JSON
format and send the request.

Excel Tables Genius Page | 43


My Excel Genius
4. Now we wait. We’ll just staying in holding pattern until But for our purposes, we just need it to parse JSON.
the request (declared as a Microsoft XML object) tells
us it’s finished.
5. The function finally returns the JSON it retrieved from
the webservice.
Let’s test it out.
Enter this routine above the GetResponse() function.
In this example, I’m using the Datamuse webservice to test
retrieving JSON data.
This query says: Give me a list of adjectives used to describe
the word ‘ocean’. Now we have a simple routine to parse our JSON data, enter
the specific data we want into an array and tell us how many
items it found.
Let’s have a look at what the code’s doing:
Okay, we’re half-way there.
1. The first few lines declare a variable, script, as being a
We’ve got a clean and simple way to retrieve data from a shiny new MS Script Control object and tells it you
webservice. want to use “JScript”. The other alternative is
Now we just need an efficient way to parse the JSON and “VBScript”.
load it into Excel.
2. You then define an object variable called items
Enter the Script Control . . . (original, I know) to hold the data structure. This is
Now set a reference to the Microsoft Script Control in the then populated by asking the Script Control to
Excel VBE. evaluate the JSON.
The script control has several other purposes, including the
interpretation and execution of scripts in a host application.

Excel Tables Genius Page | 44


My Excel Genius
3. As this isn’t a true array you can’t use UBound() to from the JSON object (words) and a range object
determine how many items it has. Instead, you can (Target) so you can paste the results to a worksheet.
use a helper function to loop through the Items object 2. Next you call the GetResponse function, passing the
and count them. You’ll then use this number to resize URL and have the resulting JSON assigned to the json
the output array, ready to be populated. This also variable.
helps avoid using ReDim Preserve which can be a tad
on the slow side. 3. Finally, you call the ParseJson function, passing the
JSON object and the array to be populated.
4. You then loop through each top-level element in the
object, retrieving the value for “word” and passing it If this returns a value greater than zero, you swing into action
to the VBA array. and define where you want the list of words entered and
assign the array to that range.
Now let’s tie it all together and see it in action.
You may have noticed that we’re also flipping the array using
Update the Test_GetResponse routine so it looks like this: the worksheet Transpose function before assigning it to the
Target range.

Let’s pull it apart. . .


1. First you declare some variables you need for this
process. One to hold the JSON data returned from the
webservice (json), an array to hold the values parsed

Excel Tables Genius Page | 45


My Excel Genius
Topic Why does Excel select more than one cell when I What Extended Mode does is allow you to achieve the same
kind of selection the SHIFT key does without having to use
Functionality click?
your mouse.
One possibility is that you may be experiencing is Excel’s
Question It’s a feature for all those keyboard freaks out there (like me )
Extended Mode functionality.
Why does Excel select Try this.
You may already know that if you hold down the CTRL
more than one cell when I (Control) key while you’re selecting cells, you can select a 1. In Excel, create a new workbook.
click? range of cells which may not be next to each other. 2. Select cell B2 in the top-left corner of the worksheet.
3. On your keyboard, press F8.
4. Now press the down-arrow key 10 times, and then the
right-arrow key 5 times. You’ve just selected 66 cells!
5. Press F8 again to turn Extended Mode off.
So, if you find your cells getting ‘sticky’ (for lack of a better
word), check Excel’s Status Bar in the lower left corner of the
screen:
Nifty.
And if you select one cell, hold down the SHIFT key, then
select another, you’ll select all the cells in-between.

If it says Extend Selection, simply press F8 to turn it off.

Excel Tables Genius Page | 46


My Excel Genius
Topic How to Calculate Average while Ignoring Blank Average with Zero Cells

Formulas Cells If however, you do actually have cells with zero that you
want to exclude from the average calculation, then Salam is
If you only want to exclude blank cells from your average,
Question correct; the AVERAGEIF function is what you need.
there is no need to use the AVERAGEIF function.
What is the excel formula Here’s an example:
The AVERAGE function will already ignore blank cells for you.
to calculate average value Average with Blank Cells
ignoring blank cells? Here’s an example:
Side Note
One other responder
stated you must use
AVERAGEIF which is why I
mention it in my answer. Again, I’ve included the formula in row 10 so you can see
what’s going on.
As you can see, it’s not
The first part of the AVERAGEIF function – here C18:C22 –
necessary to ignore The cell with the red border has a zero. As you can see, it is
tells Excel which range of cells you want to test.
blanks (but is necessary included in the Average calculation.
In the next argument – here “<>0” – you tell Excel what your
to ignore zeroes). Meanwhile, the cell with the green border is blank. Excel
test condition is. Here’s we’ve told Excel we want to
ignores this cell and gives us the correct (or at least expected)
calculate the average where the values do not equal zero.
average of 10.
Finally, the last argument – here also C18:C22 – we tell Excel
I’ve included the actual formulas in row 10 so you can see
which cells we want to know the average of.
how the averages were calculated.
As you can see, AVERAGEIF correctly excludes the zero value.
As you can see, a blank cell has no impact on Excel’s
AVERAGE function.

Excel Tables Genius Page | 47


My Excel Genius
Topic How do you use Excel Professional not as a
Functionality spreadsheet?
As a professional Excel VBA developer I use Excel to write SQL
Question
Statements.
What do you use Here’s an example:
spreadsheets for as a
professional tool to make
your job easier?
You can see the formula in the formula bar is just called
Side Note InsertSQL().
This question relates to Here’s what the VBA looks like. Quick & Dirty but it does the
using Excel for tasks not job:
I first write the INSERT statement in the database (usually
usually associated with
SQL Server) and copy it to Excel to create a formula out of the
spreadsheets. SQL statement.
Each field value to be inserted references a cell with the
appropriate value. It’s then easy to copy the formula down
for all the records I need to insert.
This is a simple method to quickly insert records into SQL
Server when I don’t have more suitable tools available.
Sometimes though, the SQL statement is far too long to
create a regular Excel formula. Excel complains and says the
formula length exceeds its limit.
In these situations, I’ll write a User Defined Function (UDF) in
VBA to create the SQL statement like this:

Excel Tables Genius Page | 48


My Excel Genius
Topic What is the purpose of the Excel binary In larger spreadsheets (in the tens of megabytes range) I’ve
seen anything from a 30% to 50% reduction in size.
Workbooks workbook format?
So with a little background out of the way, let’s answer your
In Excel 2003, Microsoft introduced a file format based on
Question question as to the purpose of binary workbook formats.
XML (Extensible Mark-up Language).
What is the purpose of In the early days of spreadsheets, applications like Lotus 1-2-
If you’re not familiar with XML, it’s a text based format, sort
3 and Excel would load the entire spreadsheet into the
the Excel binary of like HTML in that it uses a series of ‘tags’ to structure data
computer’s memory.
workbook format? just as HTML uses tags to structure a web page.
You need to remember that this was at time when your
The XML file formats are usually slower for Excel to open and
computer had memory (RAM) measured in hundreds of
process.
kilobytes, not megabyte let alone gigabytes like today.
On small workbooks you probably won’t notice the
That’s like saying computers used to have a thimble for
difference, but on larger files it is.
memory when they now have a 44 gallon drum.
There’s also a difference in file size. The XML file formats
Because of this the spreadsheet’s size and structure played a
tend to be larger.
huge role in how fast the Excel could load and process a
So if you want your Excel files to be as small as possible (as spreadsheet given the memory constraints. The most
well as being faster to open) save them with an XLSB file efficient and effective file format for this was a binary file.
extension. XLSB files are binary files.
Nowadays the processing power most PCs have far exceeds
They tend to be the demands most users place on it, so while still important,
smaller and faster to it’s not as crucial. Hence the XML based workbooks provide
load. the advantage of being an ‘open’ format while the binary
If you try to open an format.
XLSB file in a text
editor, it would look
something like this:

Excel Tables Genius Page | 49


My Excel Genius
Topic Determine a Prior Month Name from the The first is the start date. That is, the date you want to
calculate from, In your case, that’s a date in the current
Formulas Current Date
month.
Excel’s got some handy-dandy date functions including one
Question The second is a number which represents how many months
to get the last date of the month for any month in the future,
in the future, or the past, you want the now about.
How do I extract a or the past.
If you wanted to know what will be the last day of the month
previous month’s name Here’s how it works:
in 6 months from now, you would enter 6. When you want to
from a date of the current know a date in the past, you enter a negative value. So last
month in Excel? month (or 1 month prior) would be -1.
Now, to get the ‘name’ of the month, there’s a couple of
techniques you can use. It really depends on how you want
First your start with a date in the current month. In this to use the name of the prior month.
example (above) I’ve used Excel’s TODAY function to get the
current date. You could simply type in a date as well. If you simply want to display the name of the prior month in
a cell, the perhaps the simplest way is to format the cell with
Next you want to know want to know a date from the prior the EOMONTH formula:
month. You can achieve that with Excel’s EOMONTH - or ‘End
Of Month’ - function, like this:

In this example, cell B4 has a custom number format like this:

The EOMONTH function needs two pieces of information


(that is, ‘arguments’).

Excel Tables Genius Page | 50


My Excel Genius
Excel’s TEXT function lets you format a value using pretty
much any custom number format you could create in the
Format Cell dialog (above).
You can also use the TEXT function as part of a longer
sentence in your spreadsheet by concatenating other text
with it like this:

If you wanted the full name of the month (‘February’ rather


than just ‘Feb’) then you would make the custom number
format ‘MMMM’ instead.
But . . .
. . . if you wanted to use the name of the prior month as part
of a report (perhaps an invoice) you can wrap the date from
the prior month in another Excel function . . .

Excel Tables Genius Page | 51


My Excel Genius
Topic How can I Calculate Fortnightly Loan Here you can see the PMT function in action. PMT requires
(at least) 3 pieces of information (arguments) to perform its
Formulas Repayments?
magic. These are:
Excel’s PMT function allows you to calculate loan (annuity,
Question The interest rate per period,
really) repayments based on the loan amount, interest rate
How can I write a single and term of loan. The number of payment periods, and
MS Excel formula to Let’s take a look at an example using the specifications you The amount or principal (or present value) of the loan.
evaluate the fortnightly mentioned . . . Notice as well that the PMT function does not ask for the
payment, with amount number of years of the loan or the interest rate per annum.
borrowed, interest rate, Instead it requires the number of payment periods. In your
and years of loan case that’s fortnightly (rather than monthly, semi-annually or
annually for example).
repayment entered in cell
In your example the interest rate is E13 / 26. We divide The
address E12, E13, and annual interest rate in E13 by 26 because there are 26
E14? fortnights in a year.
In this example, if you borrowed 100,000 at 5% per annum
over 25 years, your repayments would be 270 per fortnight. We then multiply the number of years the loan is taken for
by 26 - again because there are 26 fortnights in a year. In
Let check out the gory details and dig in to the formula . . .
your example, making one payment every fortnight for 25
years, means you will be making a total of 650 payments over
that time period.
Note also, the period used for the rate and term must be the
same. That is, if the rate is monthly, the payment periods
must also be monthly. You can’t have an annual rate with a
fortnightly payment period.

Excel Tables Genius Page | 52


My Excel Genius
Finally, the amount borrowed is entered as -E12. Notice the
minus sign in front of the E12?
Here’s what would happen if you removed the minus sign:

Whoa ! The repayment has gone negative!


That’s because the payment represents cashflow. In this case,
the cash is flowing from your hip-pocket to the loan provider,
so it represents a negative cashflow for you.
To make it look positive, you simply add a minus sign in front
of the loan amount (or principal).

Excel Tables Genius Page | 53


My Excel Genius
Topic Can I Delete every other Row on a Whole Essentially, when you call this function, you pass the starting
cell (StartCell) which can be any cell in your table or range.
Functionality Spreadsheet?
The function then gets a reference to the entire range (using
Excel doesn’t have any native feature to delete every other
Question CurrentRegion) and then proceeds to iterate through each
row in a whole spreadsheet although there are several ways
row starting from the 2nd row. It assumes the first row is
Can I delete every other to go about this.
headings.
row on a whole One approach is with a formula as other responders
Using VBA’s MOD operator, it skips every second row. Every
spreadsheet? suggested. If you prefer that approach you may want to look
other row is added to a range variable (called Target) using
at the MOD() function which provides a clean way of flagging
the Union() method which combines multiple ranges.
every Nth row.
By the time it has finished, you’ll have a range object of every
Another approach is with a VBA macro. A function like this
second row.
would set a reference to every second row in a range (or
worksheet): Why don’t we just delete the rows on each iteration?
Speed, baby, speed.
If you delete every other row, one-at-a-time, you can be
there for a very long time, even if you turn calculation to
manual and turn screen updating off.
The other reason is, I find it far more flexible that the
function returns a range object that I can then decide what I
want to do with. For example, maybe I wanted to shade
every alternate row. Or perhaps copy every 2nd row. This
function would allow me to do that too.

Excel Tables Genius Page | 54


My Excel Genius
You could call this function like this:

In this example, you call the function and assign the resulting
range object to a variable called Target. You can then decide
what you want to do with this range.
Format it.
Delete it.
Whatever.
But this function does have a few limitations <gasp!>. Okie dokie, now we’re cooking. GetRows Mark II, addresses
some of the limitations of the first version :)
For example, what if your range does not have a heading row
as this one assumes? The first thing we’ve added is a flag called HasHeading.

Or what if you wanted to delete every third row, or every This lets you tell the function if the range has a heading row.
seventh row. If it does have a heading, the looping will start from row 2,
otherwise it will start from row 1. Neato :)
This function won’t help either. Let’s see if we can improve it
a little . . .

Excel Tables Genius Page | 55


My Excel Genius
Next, we’ve added an optional argument called EveryNth.
This lets you tell the function which rows to select. Is it every
3 rows? Every 5 rows? If you don’t nominate a value, it will
default to every 2 rows.
So, to delete every third row in a range (or worksheet) that
has a heading row, you would call the function like this:

There are other ways to improve the function. For example,


some error handling wouldn’t go astray.
Also, a return value might be handy. You could get it to
return True or False (as a Boolean) indicating if it was
successful (or not) but I’d probably get it to return a number
(Long) telling me how many rows it selected.

Excel Tables Genius Page | 56


My Excel Genius
Topic The Insert Rows Option is Disabled If that’s the case, the most likely reason is that the worksheet
is protected.
Functionality There are several methods for inserting rows in an Excel
worksheet. To check if the sheet is protected:
Question 1. Select the worksheet you can’t insert a row in.
How can I insert extra In one method, 2. From the Excel ribbon, click the Review tab
rows into my worksheet? you simply right- 3. In the Protect group, look at the button to the left of
I tried to insert but the click the row ‘Protect Workbook’.
insert button is grey.. and heading and
select Insert from This will either display ‘Protect Sheet’ or ‘Unprotect Sheet’.
doesn't work. the shortcut menu
like this:

If it says ‘Unprotect Sheet’, your sheet is protected. Simply


click ‘Unprotect Sheet’ and try inserting a row again.
From what I
understand, the But . . . (you knew it was coming),
Insert option is . . . the protection may require a password.
disabled like this: If it does have a password enter it when prompted. If you did
not protect the sheet, you will need to ask the person who
protected it for the password.

Excel Tables Genius Page | 57


My Excel Genius
Topic What is the D function in MS Excel? The DSUM formula looks like this:
Excel's 'D' functions are also called 'Database' functions. =DSUM(A1:H21, H1, L1:L2)
Formulas
These are a series of functions which perform calculations on Here, A1:H21 is my table (that is, the 'database'), H1 is the
Question heading cell in my table I want to sum, and L1:L2 is a
a range of data or table in Excel. The Excel range or table is
What is the D function in this case is the "database". separate table with my conditions.
MS Excel? For example, if you wanted to add a column of number in an The more conditions you have, the bigger the condition table
Excel table, but only wanted to add certain numbers based becomes.
on some condition or criteria, you *could* use the DSUM Compare this to the SUMIF function, which does basically the
function. same thing.
One characteristic of DSUM however is that you need to =SUMIF(D2:D21, "GBP", H2:H21)
specific your criteria in a separate range. Here, A1:H21 are the cells in my table I want to test, then I
Here's an example: have entered the currency I want to sum for, and H2:H21 are
the cells I want to sum if the respective currency cell is 'GBP'.
You can see that SUMIF is more "self describing" as it doesn't
require a separate criteria table.
What if you have more than one condition or criteria?
Excel can handle that with the SUMIFS function.
In general, the Database functions now have easier to use
equivalents.
For example, you can use SUMIF and SUMIFS instead of
DSUM, or COUNTIF and COUNTIFS instead of DCOUNT.

In the example above, we want to sum the Amount USD for


all trades which are in British Pounds (GBP).

Excel Tables Genius Page | 58


My Excel Genius
Topic How do you call a macro several times with • If your Sub routine or Function has several
different arguments? parameters, the ParamArray must be the last
VBA parameter in the list.
These several techniques you can use to call a given VBA
Question Here’s a couple of examples on how to call this function and
macro several times with different arguments.
pass a different number of arguments:
How do you call a VBA By “different arguments”, I assume you mean a different
macro several times with number of arguments, rather than arguments of different
different arguments data types. Call it once with a number and again with a date -
that sort of thing.
(Excel, VBA,
development)? VBA supports something called a ParamArray. A ParramArray
allows you to have a parameter which can accept any
number of arguments. It looks like this:

The first example has 6 ‘Integer’ arguments. The second


example has 4 ‘Single’ arguments.
As mentioned, the ParramArray must be a Variant data type,
so if you have no control of where the values come from,
you’ll want to do some basic validation in your function.
Something like this perhaps:

There’s a couple of things you should notice here:


• The ParamArray keyword tells VBA this is an argument
which could have any number of values.
• The ParramArray is always of a Variant data type.
• The ParramArray is always implicitly passed by-value
(that is, ByVal).

Excel Tables Genius Page | 59


My Excel Genius
Topic How do I replace #value with 0 in Excel? Then for the second argument, you enter the value you to
have return, if the formula generates an error, in your case
Formulas Depending on how you have your data and formulas
zero. This default value could also be text, for example,
structured, there’s several ways you can replace #VALUE
Question “Invalid Division”.
errors with 0 in Excel.
How do I replace #value Here’s one approach which may suit your needs . . .
with 0 in Excel? Excel has several worksheet functions which allow you to test
if a formula results in an error such as ISERROR and ISNA.
ISERROR in particular lets you nominate an alternative value -
such as zero - if a formula results in an error.
Let’s look at an example . . .

In this example, the formula in Column C is dividing the


Rating by the Count.
Because the Rating in cell A1 has a text value rather than a
number, the division results in a #VALUE error.
Bummer .
In cell D2, there’s a formula to handle this situation.
You start by entering the ISERROR function. The first
argument is the formula you want to calculate. In this
example the Rating divided by the Count, or A3 / B3.

Excel Tables Genius Page | 60


My Excel Genius
Topic How can I prevent Excel Adding New Sheets?
Functionality From what I understand you're asking; you have an Excel
workbook and you want to prevent users from adding more
Question worksheets to it.
Is it possible to get Excel If that's the case, this may help.
to stop adding sheets? Excel doesn't have a specific feature to set the maximum
number of worksheets.
However, there are several options available to you to The password is purely optional. But remember, if you don’t
prevent worksheets being added to a workbook. Let's take a enter a password, anyone can “unprotect” the workbook.
look at them... If you do enter a password, Excel will ask you to enter it a
Protecting Your Workbook second time to confirm you entered what you thought you
The fastest and simplest option is to protect your workbook. did

You’ll find the option to do this under the Review tab on the
Excel Ribbon:

Check it out.
Simply open the workbook you want to protect and click the
Protect Workbook button.
You’ll be presented with a small screen asking for a
password:

Excel Tables Genius Page | 61


My Excel Genius
You now can’t Insert a new worksheet. One of these Events happens when you add a new sheet to a
workbook.
You can then add some VBA code to this event to tell Excel
that when ever someone inserts a new sheet, delete it
immediately. The net effect is, users won’t be able to add
new worksheets to a workbook.
If this option is suitable for your needs, then try this:
Open the workbook you want to protect and display the
Visual Basic Editor by pressing ALT+F11 on your keyboard.
Then:

Mission accomplished. 1. In the list of Microsoft Excel Objects, double-click the


workbook you want to protect.
Deleting Added Worksheets with VBA
2. From the list of objects, select Workbook.
There may be situations where protecting the whole
workbook structure may not be suitable. 3. From the list of Events (remember, these are actions),
select NewSheet.
For example, you may have noticed that when you protect a
workbook you also can’t Delete, Move or Copy any 4. Enter these 3 lines of VBA code.
worksheets either.
Bummer
One sneaky way around this is to use some VBA code to stop
users adding new worksheets.
It works like this:
Excel allows you to add macros to when certain actions
happen, like adding a workbook or inserting a worksheet.
These “certain actions” are called Events.

Excel Tables Genius Page | 62


My Excel Genius
The first line tells Excel not to prompt the user when the
sheet is about to be deleted.
If you don’t add this line, your users would see this message
each time they tried to insert a worksheet:

The second line deletes the actual sheet that was just
inserted.
The last line tells Excel to start prompting you again for
actions such as deleting things.

Excel Tables Genius Page | 63


My Excel Genius
Topic How do I import up to 100 rows of data into Excel will then interrogate the webpage you entered and
present you with a list of tables it finds on the webpage, like
Internet Excel from the web?
this:
Depending on which version of Excel you’re using, the ability
Question
to import data from the web (as well as limiting the number
How do I import into of rows) is available and easy to use.
Excel online data from Let’s say you wanted to import a list of countries and their
the web? I can only respective Gross Domestic Product values (GDPs) from this
wiki page.
import data up to 100
rows. In Excel, click the Data ribbon tab. There you’ll find the From
Web button in the Get & Transform Data group. Give it a
click.

In the From Web dialog that appears (below), paste in the


URL (webpage link) and click OK. When you select one of the tables Excel finds (on the left-
hand side) it will present you with a preview of that table on
the right-hand side. Neat!
From here, do not click Load.
Instead click Transform Data.
This will open up the Power Query Editor.
From here, on the Home ribbon tab select Keep Rows and
then Keep Top Rows.

Excel Tables Genius Page | 64


My Excel Genius
If you ever need to edit the query - say, change the number
of rows imported - double-click the icon for this table in the
Queries & Connection pane.

In the Keep Top Rows dialog (below), enter the maximum


number of rows you want (you mentioned 100) and click OK:

Finally, from the Home ribbon tab, click the Close & Load
button.

Voila!
You have your data in your spreadsheet.

Excel Tables Genius Page | 65


My Excel Genius
Topic How do I Transfer a UserForm Between For this technique:

VBA Workbooks with VBA? 1. First find and select the UserForm you want to
There’s 3 main techniques you can use to transfer a transfer.
Question 2. Right-click your mouse and from the short-cut menu
UserForm from one workbook to another.
How do I transfer You can use: select Export File
userform(UI) from one 1. Drag-and-Drop, 3. Choose a suitable folder to save the UserForm
workbook to another in 4. Now select the destination workbook.
2. Export / Import and
VBA? 5. Right-click your mouse and choose Import File.
3. VBA Automation.
Let’s look at each :) 6. Select the saved UserForm and click Open
Drag-and-Drop Method VBA Automation Method
The first technique is the easiest. You can drag the UserForm The third technique – and the one I believe you really want to
your want from one workbook to another in the Visual Basic know about – uses VBA to automate the process of
Editor (VBE). transferring a UserForm.

1. First find and select the UserForm you want to The first thing you’ll need to do for this – before you write
transfer. any code, is set a reference to the Microsoft Visual Basic for
Applications Extensibility library.
2. Hold down the left mouse button
In the VBA Editor, from the Tools menu, choose References:
3. Drag the UserForm to the destination workbook, and
4. Release your mouse button.
Export / Import Method
While the second technique has more steps, it does provide
you a backup copy of just the form without the workbook.
This might be handy if you want to email the form to
someone with giving them the entire workbook.
Excel Tables Genius Page | 66
My Excel Genius
Scroll down the list and tick (check) the Microsoft Visual Basic
for Applications Extensibility library 5.3.
So, what’s this for?
This gives you access to the object hierarchy of the VBE so
you can manipulate objects like modules, classes and, of
course UserForms.
Rather than describe each step, here’s some sample code
with comments.

Excel Tables Genius Page | 67


My Excel Genius
Topic How do I add a Floating Button or Icon to an So, for this example I’ve added some images in the way of
Picture Boxes, like this:
Functionality Excel Workbook?
As you’re probably aware, Microsoft introduced the “Ribbon”
Question
into Excel in 2007.
Is it possible to add a Prior to this is was quite simple to create floating toolbars
floating button or icon to like this, which is what I assumed you’re asking about.
an excel workbook? You can add whatever code you need to these images (a.k.a.
“buttons”).

Since 2007, Excel hasn’t supported creating floating toolbars Note that Picture Boxes don’t respond to “click” (the click
or buttons in the same way. event) so you can use the MouseUp event instead like this:

So, the short answer is no, you can’t create a floating toolbar
or floating buttons the way you used to be able to in Excel.
However, Excel is a flexible beast and there’s usually more
than one way to achieve a result. You mentioned that you wanted to add the floating buttons
to a workbook. I take it you want these buttons available to a
From your question it sounds like you only want this floating specific workbook.
button to be available for a specific workbook.
So assuming you have created the UserForm floating toolbar
Let’s take a look at how you can do that. in the appropriate workbook you can get it to display each
First the “toolbar” or “floating button” in this case. time the workbook opens like this:
This is going to take a little VBA and the magic of a UserForm.
In Excel’s Visual Basic Editor you can create a form (known in
Excel as a UserForm) which can hold controls.
In your case you want a button. You can add a button, but
I’ve got to confess, they’re kinda ugly.

Excel Tables Genius Page | 68


My Excel Genius
In the Visual Basic Editor, select the workbook. From the list
of Workbook Events, select Open.
And this is where the magic happens, you tell Excel that each
time this workbook opens to display your form with buttons
modeless.

vbModeless tells Excel to show the form as a floating form,


which means you can still click behind it and work with the
spreadsheet.
When you open the workbook, the floating buttons look like
this:

Excel Tables Genius Page | 69


My Excel Genius
Topic How can the Shape of the Cell Comments be
Formatting Changed?
I’m assuming you’re talking about the “old” style cell
Question
comments not the new dang-fangled “notes” which also get
How can the shape of the entered in cells.
cell comments be So if you’re wanting to change the shape of one of these…
changed in Excel?
Side Note In the Visual Basic Editor, you’ll want to create a simple
Normally when you insert macro like the one above.
a cell comment, Excel The first line defines a variable as being a cell comment.
creates a plain The second line assigns the active cell’s comment to the
rectangular comment. variable.
But there are actually … you’re in luck You’ll probably need to update this line to meet your specific
There’s no option to select the shape when you create a cell needs.
dozens of different
comment via the ribbon or short-cut key (SHIFT+F2). Now that your VBA code has a reference to a cell comment,
shapes you can use, but
But if you sprinkle a little magic VBA-dust, you can change you can change it.
you need to access them
the shape of an existing cell comment (or even if you create a Each comment has a Shape property. And the Shape
via VBA. new cell comment via a macro). property itself has an AutoShape property. It’s this
Here’s how . . . AutoShape property which lets you select the shape of the
comment.
You’ll notice that when enter the “=” sign, the VBE’s
Intellisense will display a list of available choices.

Excel Tables Genius Page | 70


My Excel Genius
Simply scroll down the list and select and shape, then run the
code.
Take your time to experiment with various shapes to see
which ones suit your needs.
Here’s an example using a Balloon (the AutoShape property
value is msoShapeBalloon).

And another using a Left Arrow (the AutoShape property


value is msoShapeLeftArrow).

A quick word of warning. Not every shape in the list will


work. Some may generate an error. Just ignore the error and
try a different shape instead.

Excel Tables Genius Page | 71


My Excel Genius
Topic How do I Check if Two Text Cells Match? As you can see, EXACT is case sensitive and the formula in D4
returns FALSE because “FRED” is not the same as “fred”.
Formulas There's several techniques to check if two cells match in
Excel. Meanwhile, EXACT does return TRUE when both texts are
Question exactly identical:
The technique that has been suggested here most frequently
How do I check if two text is to use a formula that says: “does the text in one cell equal
cells match in Excel? the text in another cell”, like this:

On the face of it, this formula, = C3 = D3 appears to work.


But hang on a minute . . .
. . .the “FRED” in cell C3 is in capitals, while the “fred” in cell
D3 is lower case.
This may or may not be an issue for you. It depends on what
kind of text comparison you’re trying to achieve.
If capitalisation is important in your check, then this
approach won’t work.
Another alternative is Excel’s EXACT function.
It look would compare our two Freds like this:

Excel Tables Genius Page | 72


My Excel Genius
Topic How do I return the name of a sheet in a cell It then uses the MID function to extract 31 characters from
the full string, starting from the position of the “]”.
Functionality without using VBA?
Why 31?
I’ve listed several ways you can get the name of a worksheet
Question That’s the maximum length a worksheet name can have
in an Excel cell . . .
Is there a way of The Formula Method It may look a little messy, but it works.
returning the name of a This first technique is pure formula (no VBA code involved). One caveat - your workbook must be saved for this approach
sheet in a cell without It starts with the CELL function like this: to work.
using a code in Excel? The VBA Method
Yes, I know you asked for a technique that worked without
using “code”, but I thought I’d throw this in anyway for
completeness.
However, as you can see, it returns the full path, file name This technique uses a short VBA function to display the sheet
and sheet name. name in a cell.
So you need to go one step further to just display the sheet Here’s how this technique would look:
name, like this:

This formula uses the FIND function to locate the position of


the closing “]” at the end of the file name.

Excel Tables Genius Page | 73


My Excel Genius
You can see the worksheet name (1) is shown in a cell (2) and To achieve this:
the formula (3) is straightforward. 1. from the File menu choose Print and then select Page
Let’s look at the VBA function . . . Setup.
2. From the Page Setup dialog, select the Header/Footer.
Let’s assume you want the sheet name displayed in the
lower-right corner of the page.
This function requires (a parameter) of a cell in the Click Custom Footer to display the options below:
worksheet, which I’ve called Target. It can be any cell in the
sheet.
From there, the VBA code gets the Name of the cell’s (i.e.
Target) parent. A cell’s parent is the worksheet in which that
cell lives.
One characteristic of this approach is you do not have to save
the workbook for the worksheet name to display like The
Formula Method.
Another consideration is where to keep the VBA function.
One approach is to save it to your Personal Macro Workbook
so it is always available to you. Click in the Right Section box and then click the Sheet icon
The Page Setup Method .
Finally, one reason some people want the sheet name in a You’ll see “&[Tab]” displayed in the textbox . This is Excel’s
cell is so it will be displayed on any print-outs. code to display the sheet (tab) name.
If you simply want the sheet name displayed on any printed
pages, you can use the Page Setup to display the sheet name
in the page header or footer.

Excel Tables Genius Page | 74


My Excel Genius
WELCOME

WELCOME
Hello and welcome to My Excel Genius. Automation
Chances are you’re browsing this compendium Learn VBA macros to automate the boring
because you use Excel in your job. A lot! stuff, save yourself a shedload of time and
dramatically increase your income and
Alternatively, you have some niggling business
promotion potential.
problem which is costing you time, money & stress.
If you must get faster and smarter results in Excel (and It’s all about Data
Marcus Syben
let’s face it – who doesn’t), you’re in the right place.
Learn the right tools to manage and analyze
Learning from the Experience of Others data like you job depends on it (because it
does).
If you use Excel in your business or in your job, I hope you
found some useful ideas in this compendium. Exploring how Functions
others solved problems you’re facing is a great way of
expanding your repertoire. Excel has almost 500 worksheet function.
Learn the ‘right’ 5% of functions you need to
The Big 4 Excel Skills you Need achieve 95% of the results.
If you want to develop your Excel skills to accelerate your
career or get more done in your business, here’s where you Where to from Here?
should focus your attention . . .
If you would like to learn more about how Excel can advance
Keyboard Shortcuts your career or solve your business problems, click the email
link below to drop me a line. Let’s talk . . .
Just like a touch-typist will outperform a
two-fingered typist, you will save a huge [email protected]
ridiculous amount of time learning keyboard
shortcuts to get more done faster.
Excel Tables Genius
Copyright © 2021 My Excel Genius

You might also like