You are on page 1of 7

Advanced Excel - Using the IF Function in Excel to Program Your Spreadsheets

If function allows us as Excel users to basically put in some programming into our Excel spreadsheets.
If-then statement so equals if, =if , then I put in a left parenthesis and as soon as I do that look Excel gives me some
tips and some hints to help me to successfully complete this formula. This is a feature in modern versions of Excel
where it’s kind of coaches you and helps you. After the left parenthesis, choose a cell to test, then after add greater
than and then the cut off point to know if it passes or fail. The first comma that you are putting in the formula
represents then. After the comma, put a space and add a quotation mark and type the word pass, another quotation
mark. The second comma represents if not or if false, then another quotation mark, type fail and another quotation
mark. It is fine if you forget to put the right parentheses at the end of the formula. =if(C3>69, “pass”, “fail”)

Using Count and CountA in Excel - Excel Tutorial


The function count or count a to help you to count the number of records that you have. First thing I need to do after
selecting the cell is tap an equal sign and then I'm gonna type in the word count and then left parenthesis and then put
the thing that you wanted to count ex. Column E. After selecting, it shows E through E or E:E. This means that you
selected the entire column. You don’t have to put the closing parentheses, you can just type enter on the keyboard
and done.

If you want to count the total number of Records but you want it to include text this is what you would have to do. This
cell equals count and then add the letter A. =counta. Counta left parenthesis and now if I select column the entire
column tap enters on the keyboard look at the number it returns.

All you have to do without setting up a formula at all is just click on the column H. On what we call the status bar, we
have some automatic information that's brought to us by Excel and one of those bits of information is the count. It also
gives me the sum of all of the numbers that are in column H. It also gives the average of the numbers in column H. If
you click a column with just letter in it, it doesn’t give enough data like the sum but it gives you the count of the
column. You can customize the information that it gives you in the status bar by just right clicking it and it shows many
options.

The Excel SUMIFS Function

Check how much did you spend in those movies; this calls for a sum function and i could do a typical sum function
here or use auto sum but that would give me the total of everything. So what if I just want a list of all the blu-rays and
the total cost for them, well I could filter the data, I could deselect dvds and just show blu-rays and things like that and
then do a sum function just of the blu-rays but that can get time consuming. The SUMIF function is a worksheet
function that adds all numbers in a range of cells based on one criteria. If you put a comma at the end, Excel id
expecting another criteria range.

The syntax for the SUMIF function in Microsoft Excel is: SUMIF( range, criteria, [sum_range] )
Range- The range of cells that you want to apply the criteria against.
Criteria- The criteria used to determine which cells to add.
Sum range- Optional. It is the range of cells to sum together. If this parameter is omitted, it uses range as the sum
range.

The Excel AVERAGEIFS Function


The Excel AVERAGEIFS function calculates the average of numbers in a range that meet one or more criteria. The
criteria used for AVERAGEIFS can include logical operators (>,<,<>,=) and wildcards (*,?) for partial matching.

The syntax for the AVERAGEIFS function in Microsoft Excel is:


AVERAGEIFS( average_range, criteria1_range, criteria1, [criteria2_range, criteria2, criteria3_range, criteria3, ...] )

avg_rng - The range to average.


range1 - The first range to evaulate.
criteria1 - The criteria to use on range1.
range2 - [optional] The second range to evaluate.
criteria2 - [optional] The criteria to use on range2.

Notes
 If no data matches criteria, AVERAGEIFS returns the #DIV0! error
 Each additional range must have the same number of rows and columns as the average_range.
 Non-numeric criteria needs to be enclosed in double quotes but numeric criteria does not. For example: 100,
"100", ">32", "jim", or A1 (where A1 contains a number).
 The wildcard characters ? and * can be used in criteria. A question mark matches any one character and an
asterisk matches zero or more characters of any kind.
 To find a literal question mark or asterisk, use a tilde (~) in front question mark or asterisk (i.e. ~?, ~*).

Using LEFT RIGHT & MID Functions in Excel


Mid, Left and Right functions sometimes called the String Functions. What often they are used for is to extract bits of
information from existing text or numbers.
For the example.

First. LEFT
Extract information from the phone number, get the area code using the phone number. The location of this phone
number from the cell where you want to put the area code is left. So type, =Left, then click the cell you want to extract
the information an then after that put a comma and then next is the count of numbers you want to produce, and last is
put the right parentheses and click enter on the keyboard.

Second. RIGHT
=Right( and just like from the first time, excel is looking for the text to examine and the character to produce.

Third. MID
=Mid( this time, there are more things needed. First is the text that you want to examine and then comma the start
numbers and then comma the number of characters. In counting, it included the comma and spaces.

Advanced Excel - VLOOKUP Basics


The VLOOKUP function in Excel is a tool for looking up a piece of information in a table or data set and extracting
some corresponding data/information. In simple terms, the VLOOKUP function says the following to Excel: “Look for
this piece of information (e.g., bananas), in this data set (a table), and tell me some corresponding information about it
(e.g., the price of bananas)”.

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])


The VLOOKUP function uses the following arguments:

1. Lookup_value (required argument) – Lookup_value specifies the value that we want to look up in the first column of
a table.
2. Table_array (required argument) – The table array is the data array that is to be searched. The VLOOKUP function
searches in the left-most column of this array.
3. Col_index_num (required argument) – This is an integer, specifying the column number of the supplied table_array,
that you want to return a value from.
4. Range_lookup (optional argument) – This defines what this function should return in the event that it does not find
an exact match to the lookup_value. The argument can be set to TRUE or FALSE, which means:
TRUE – Approximate match, that is, if an exact match is not found, use the closest match below the
lookup_value.
FALSE – Exact match, that is, if an exact match not found, then it will return an error.

Step 1: Organize the data


The first step to effectively using the VLOOKUP function is to make sure your data is well organized and suitable for
using the function.
VLOOKUP works in a left to right order, so you need to ensure that the information you want to look up is to the left of
the corresponding data you want to extract.

Step 2: Tell the function what to lookup


In this step, we tell Excel what to look for. We start by typing the formula “=VLOOKUP(“ and then select the cell that
contains the information we want to lookup. In this case, it’s the cell that contains “Bananas”.

Step 3: Tell the function where to look


In this step, we select the table where the data is located, and tell Excel to search in the leftmost column for the
information we selected in the previous step.
For example, in this case, we highlight the whole table from column A to column C. Excel will look for the information
we told it to look up in column A.

Step 4: Tell Excel what column to output the data from


In this step, we need to tell Excel which column contains the data that we want to have as an output from the
VLOOKUP. To do this, Excel needs a number that corresponds to the column number in the table.
In our example, the output data is located in the 3rd column of the table, so we enter the number “3” in the formula.

Step 5: Exact or approximate match


This final step is to tell Excel if you’re looking for an exact or approximate match by entering “True” or “False” in the
formula.
In our VLOOKUP example, we want an exact match (“Bananas”), so we type “FALSE” in the formula. If we instead
used “TRUE” as a parameter, we would get an approximate match.
An approximate match would be useful when looking up an exact figure that might not be contained in the table, for
example, if the number 2.9585. In this case, Excel will look for the number closest to 2.9585, even if that specific
number is not contained in the dataset. This will help prevent errors in the VLOOKUP formula.

How to Extract Data from a Spreadsheet using VLOOKUP, MATCH and INDEX
When you have a lot of data on a worksheet and you want to extract some of that data to use on other worksheets,
the vlookup match and index functions are great ways to do it. These functions work in any version of Excel on
Windows or Mac and they also work on the web in Google sheets and also on the web versions of Excel.

With the vlookup function and the V stands for vertical you have data arranged down columns. There is also an H
lookup function where you have data arranged across rows H is horizontal and it works
the exact same way as vlookup.

Vlookup links to different tables and they could be on the same worksheet or more likely on different worksheets even
in different workbooks using a unique identifier.

Let me explain how the syntax works like any function we start off with an equal sign and then you have
the name of the function vlookup and open a parenthesis. There are three wired arguments in one optional argument:
the first argument is what's called the lookup value and that's that unique identifier that we are talking about and in our
example, that's going to be the order number, now because you have to have commas separating the arguments in
any function. After you put in the lookup value you type in a comma and then the second argument is the table range
and in our example that's going to be the entire table but keep in mind it doesn't always have to be that then we put in
a comma and the third argument is the column number. After you put in the column number you put in a comma and
then that optional argument at the end is true or false.

SYNTAX
=VLOOKUP(lookup value, table range, column #, true/false)

 false means don't give me an approximation give me an exact amount


 true means an approximation is OK

Combining Data From Multiple Cells in Excel


Combine data with the Ampersand symbol (&)

1. Select the cell where you want to put the combined data.
2. Type = and select the first cell you want to combine.
3. Type & and use quotation marks with a space enclosed.
4. Select the next cell you want to combine and press enter. An example formula might be =A2&" "&B2.

Creating Easy Data Entry Forms in Excel


Excel has many useful features when it comes to data entry.
And one such feature is the Data Entry Form.

There are two common issues that I have faced (and seen people face) when it comes to data entry in Excel:
 It’s time-consuming. You need to enter the data in one cell, then go to the next cell and enter the data for it.
Sometimes, you need to scroll up and see which column it is and what data needs to be entered. Or scroll to
the right and then come back to the beginning in case there are many columns.
 It’s error-prone. If you have a huge data set which needs 40 entries, there is a possibility you may end up
entering something that was not intended for that cell.

Adding Data Entry Form Option To Quick Access Toolbar


Below are the steps to add the data entry form option to the Quick Access Toolbar:
1. Right-click on any of the existing icons in the Quick Access Toolbar.
2. Click on ‘Customize Quick Access Toolbar’.
3. In the ‘Excel Options’ dialog box that opens, select the ‘All Commands’ option from the drop-down.
4. Scroll down the list of commands and select ‘Form’.
5. Click on the ‘Add’ button
6. Click OK.

Note: For Data Entry Form to work, your data should be in an Excel Table. If it isn’t already, you’ll have to convert it
into an Excel Table (keyboard shortcut – Control + T).

Parts of the Data Entry Form


 New: This will clear any existing data in the form and allows you to create a new record.
 Delete: This will allow you to delete an existing record. For example, if I hit the Delete key in the above
example, it will delete the record for Mike Banes.
 Restore: If you’re editing an existing entry, you can restore the previous data in the form (if you haven’t clicked
New or hit Enter).
 Find Previous: This will find the previous entry.
 Find Next: This will find the next entry.
 Criteria: This allows you to find specific records. For example, if I am looking for all the records, where the
candidate was Hired, I need to click the Criteria button, enter ‘Hired’ in the Status field and then use the find
buttons. Example of this is covered later in this tutorial.
 Close: This will close the form.
 Scroll Bar: You can use the scroll bar to go through the records.

Creating a New Entry


Below are the steps to create a new entry using the Data Entry Form in Excel:

1. Select any cell in the Excel Table.


2. Click on the Form icon in the Quick Access Toolbar.Excel Data Entry Form icon in QAT
3. Enter the data in the form fields.
4. Hit the Enter key (or click the New button) to enter the record in the table and get a blank form for next record.

Navigating Through Existing Records


One of the benefits of using Data Entry Form is that you can easily navigate and edit the records without ever leaving
the dialog box. This can be especially useful if you have a dataset with many columns. This can save you a lot of
scrolling and the process of going back and forth.
Below are the steps to navigate and edit the records using a data entry form:
1. Select any cell in the Excel Table.
2. Click on the Form icon in the Quick Access Toolbar.
3. To go to the next entry, click on the ‘Find Next’ button and to go to the previous entry, click the ‘Find Prev’
button.Navigating uing the Data Entry Form in Excel
4. To edit an entry, simply make the change and hit enter. In case you want to revert to the original entry (if you
haven’t hit the enter key), click the ‘Restore’ button.

But you can also quickly navigate through all the records based on criteria.

For example, if you want to go through all the entries where the status is ‘In-progress’, you can do that using the below
steps:

1. Select any cell in the Excel table.


2. Click on the Form icon in the Quick Access Toolbar.
3. In the Data Entry Form dialog box, click the Criteria button.Criteria Button in Excel Data Entry Form
4. In the Status field, enter ‘In-progress’. Note that this value is not case sensitive. So even if you enter IN-
PROGRESS, it would still work.Specify the criteria in the field
5. Use the Find Prev/Find Next buttons to navigate through the entries where the status is In-Progress.

Criteria is a very useful feature when you have a huge dataset, and you want to quickly go through those records that
meet a given set of criteria.

Note that you can use multiple criteria fields to navigate through the data.

Remove Duplicates Tool in Excel


Just go to data and look on the data ribbon in the data tools group you'll notice that there's an option to remove
duplicates. When you click that by default it's probably going to check all of your columns so it's gonna look for
duplicates throughout the entire spreadsheet.
All I have to do is unselect all and then choose band so it's gonna look for duplicates only in the list of bands I click OK
it found 33 duplicates and remove them 15 unique values remain so I click OK and look at that it now is a list just of
the bands whose CDs I hypothetically sell.

Choose file save as and I could save this as a different separate spreadsheet that's just a list of all
the bands and then here in my original spreadsheet if I wanted to keep the list the way it was I could just exit out and
not save over the original and I should be able to have both copies of the spreadsheet.

Fixing Common Excel Errors – Part 1: DIV/0, N/A & NAME


1. # Div/0! error
Problem: Excel displays this error when a number is divided either by zero (0) or an empty cell.
Fix: Change the divider to a value that is not equal to 0.

This error usually appears when users ask Excel to divide a formula by zero or an empty cell.
As you all know, division by zero is not possible in the real world, then how would it be possible in Excel?

Resolving this error is pretty simple – you have to change the value of a cell to the value that is not equal to zero or
add value if the cell is blank.

2. #N/A Error
The #N/A error usually appears when the number you are referring to your formula cannot be
found. It can occur if you’ve deleted a number or row that is being utilized in the formula or if it is
referring to a sheet that was deleted or not saved.

To fix this error, you’ve to check the entire formula carefully to find which sheets or rows were
deleted or reference wrongly. If few formulas are linked together, verify that everything in every formula has value.

3. #Name? error
Problem: The text in a formula is not recognized by Excel. This is caused by misspelling the
function names. For instance =su(A1:A7) will result in the #Name? error.
Fix: Correct the error by entering =sum(A1:A7).

The #Name error is a bit complex than others. It appears when Excel is unable to understand the
name of the formula you’re trying to run, or if excel cannot compute one or more values entered in the formula itself.

To resolve this error, check the spelling mistakes in the formula. Also, type the Excel functions in lower case because
when you enter a formula, Excel will convert it to upper case automatically if it is identified.

Fixing Common Excel Errors – Part 2: NULL, NUM & #####

1. #NULL error
Problem: Excel displays this error when you specify an intersection of two areas that do not
intersect (cross). The intersection operator is a space character that separates references
in a formula. =Sum(A1:A2 C3:C5) returns the #NULL error because the two ranges do not
intersect.
Fix: =SUM(A1:F1 B1:B10) will return the correct reference.
This error occurs when Excel specify an intersection of two areas that don’t actually intersect, or when an incorrect
range operator is utilized.

Resolving this error is a bit complicated, as you’ve to verify that you’re using the proper syntax in the formula.
 Use a colon to separate the first cell from the last cell once you refer to a continuous range of cells in a
formula.
 Also, you should use a comma when you refer to two cells that don’t intersect.

2. #NUM! error
Problem: The formula or function contains invalid numeric values.
Fix: Using $ ,% symbols with the number can result in this error, so avoid using these.

The NUM error occurs when an invalid number is added to the formula. If you have added
the invalid number, you’ll find the NUM error on your spreadsheet. The same error can
occur if the numeric value used is too small or large.

To fix this error, check if you’ve entered any formatted data like currency, dates, or special symbols in the formula.
Remove any invalid characters from the formula and keep numbers only.
3. ###### error
Problem: The column is not wide enough to display all the characters in a cell.
Fix: Extend the width of the column.

The first common error that users often encounter is a cell filled with hashtag characters. But, it
is not an actual error; it simply means that column isn’t wide enough to display the value
you’ve inputted.
Fixing this error is simple, just increase the column width so that the value can be displayed in the spreadsheet.

Fixing Common Excel Errors – Part 3: REF & VALUE

1. #REF! error
Problem: The error will be displayed when a cell reference is not valid. Deleting cells that
were referred by other formulas will cause this error.
Fix: Refer the cells to the correct ranges and the error will be corrected.

It is considered one of the most complicated error and can be tricky sometimes to figure out.
The #REF error occurs in Excel when a formula references a cell that is invalid. For example, if the user removes a
cell, column, or row in a spreadsheet, and create a formula with a cell name that has been deleted, Excel with display
the #REF error in that cell.

To resolve this error, you must be careful while pasting a set of cells. Make sure there are no formulas that would get
affected on deleting a cell. Also, if you’ve accidentally deleted a cell, click the undo button (Ctrl+Z) to recover them.

2. #Value! error
Problem: This error will be displayed if the formula includes cells that contain different data
types. = B1(85) + B2(75) +B3(data) will result in the #Value! error message.
Fix: Replace B3(data) with a numeric value and the error will be corrected.

The #Value error is displayed in Excel when it finds any spaces, characters, or text in a
formula where it expects a number. The simplest way to fix this error is to check the formulas and assure that only
numbers are used in it.

How To Import Text File into Excel (4 Examples, including Tab & CSV Files) – Excel
Magic Trick 1619

We get data that has the extension dot txt that means this is a text file. Field names are in the first row, records and
subsequent rows and the delimiter which just means what separates the bits of data. The delimiter for us is a tab.

To import the text data into our excel worksheet and we're using Excel 2013 or earlier, we go to get external data from
text we select our file and click import.
This is the classic text import wizard it knows we have a delimiter be sure and check my data has headers. We click
Next it knows that we have a tab delimited down below we can see the different
columns and how the data has been separated. Next when we select the column data format general it will interpret
dates numbers and text correctly click finish then click OK and our data is imported into our Excel worksheet.
If we're in Excel 2016 or later we go to the get and transform data group in the data ribbon tab which is power query.
Then we go from text CSV, we find our file and click import it wants to know what the delimiter is it guessed right, we
come down to load - and it's going to load as an Excel table which of course has dynamic ranges existing click OK.

Now over here in queries and connections we can see that five thousand rows have been loaded using power query.
Over here in connections we can see this file was loaded using the text import wizard if either one of these text files
changes you can right click down to refresh over here even though it doesn't look like it's connected anywhere. We
can right click refresh now as a text file bone, if we don't have tab as a delimiter about a comma then when we click
from text we see something like this click import and there it is it picked up that this is a comma load - click OK.

Bonus Number two


What if you have a modern version of Excel and you don't want to import it as a table you want to. Use the legacy 3-
step wizard to just dump it as some data. Well guess what under get data, there's the legacy wizards and the way you
add this option is under file options data and look at that I happen to really like the web legacy version you can check
whichever ones you'd like all right that was a little fun with importing text files into Excel.

You might also like