Excel Opening Screen in Excel
Excel Opening Screen in Excel
Excel Opening Screen in Excel
How the first screen of MS Excel looks like and what are the options?
3. The last option is to navigate through the start menu and click on MS
Excel icon.
To create blank and fresh MS Excel file, select Blank workbook that is
displayed in first column of the first row.
2. Open - the default screen that appears when MS Excel is opened and it is
already explained in the beginning of this topic.
3. Save / Save As - Save and Save As both opens the Save As screen that
is shown below. This let us save the file we are working on either on the
OneDrive, Computer or any other places we have added.
4. Print - Print shows the Print page that allows us to choose the printer on
which we want to print. We can also save our MS Excel file as .pdf through
this option by selecting Microsoft Print to PDF option from the Printer
dialogue box.
Apart from this, it also helps us in setting up the page size, margin,
orientations etc. while printing.
Be aware that all functionality of the MS Excel file and the look & feel of
the original MS Excel file may change based on what file type we are
exporting to.
7. Close - Close, simply closes the current work book.
9. Options - helps us to customize the MS Excel like change the font, font
size, toolbars etc. We shall talk about this in details later in this tutorials.
Cell Range in Excel
What is range and how to select, fill, copy-paste, move, insert rows and columns in MS Excel?
To quickly know what cell you are on, simply look at the top-left side just above
the spreadsheet. In picture below, the cursor is on column D and row number 17
so 'D17' is being displayed. By default that cell is active and ready to be edited
with keyboard or mouse.
Write down first 2 numbers in 1st and 2nd row from where we want to start.
Select both cells and drag to rows or columns by holding the bottom-right
corner of the 2nd cell.
The result would look like this.
To automatically fill the range of dates, write the first date in a cell and
then hold the bottom-right corner of the cell and drag.
Now, hold the bottom-right corner of the selected cells and drag. The
result would be like this.
We could have done this individually to week day and month name also.
Play more...
Can you try following
1. Writing the number in descending order - from 10 to -5
2. Writing dates in descending order - today to 1 week back
3. Writing repetitive values a (in C1) and b (in C2) to cell C3 (a), C4 (b), C5
(a), C6 (b) etc.
To insert multiple rows in between, select multiple rows (by selecting a row and
dragging mouse over other rows) and then insert.
Inserting column
To insert a column, first select a column by clicking on the column header and
right click. Select Insert from the context menu.
The result would be like this.
To insert multiple columns, select multiple columns (by selecting a column and
dragging mouse over other columns) and then insert.
If we try to add two string value instead of two integer values, we will get error
like shown in the image below
Operators in Formula
Excel understand the operators in formula as it is treated in normal
mathematical calculations. Look at the image below.
In B5, we wrote '=B2+B3*2' and this resulted as 96 because first it multiplied 8
by 2 and then added to 80.
In B5, we wrote '=(C2+C3)*2' and this resulted as 176 because first it added C2
and C3 and then multiplied by 2.
2. Go to D2 and hold the bottom-right corner of the cell (the mouse cursor
becomes + as shown below) and drag to D3 and D4.
Here
1. AVERAGE is the average value of selected cells (D2, D3 & D4)
2. COUNT is the number of cells selected
3. SUM is the sum of selected cells value.
Quickies
Can we add multiple cell value by separating with + symbol (eg.
=A1+A2+A3+A4) ? - YES
Can we add, subtract, multiply and divide at once using cells reference
(eg. =A1-A2*A3/A4) ? - YES
Can we directly add, subtract, multiply and divide numbers in cells (eg.
=20+30-20*40/3)? - YES
A dialog box opens with the list of functions available in MS Excel and by default
'Most Recently Used' function appears in the list. We can change the category
dropdown to choose a function available in that category.
For this demo, let's use AVERAGE function from the list (In case this function is
not available in the default list of your screen, simply use the Search for a
function box to search it).
After selecting AVERAGE from the list of functions, click OK. This opens another
dialog box that ask us the argument to pass into this function.
Average basically returns the average of its argument. So either we can write all
cells one by one in Number1, Number2 etc. boxes or we can specify them by
selecting the first cell (D2) and then start dragging (the screen changes as
below). Keep dragging till you reach to your target cell (D4). Excel automatically
surrounds selected cells with dashed border to notify that those cells have been
selected.
We will get the range of cells written in Number1 text box as displayed in below
picture. The result also appears on the dialog box. Now click OK.
In previous post, we learnt about Functions and Formulas in Excel. In this post,
we shall learn about different types of Cell references to be used in formulas.
Quickies
Now, assume that instead of giving Absolute reference to H3 cell, you would
have given Relative reference in the E3 cell. So your formula would have been
'=C3*H3'. Now, if you copy-paste this to E4 and E5, you would have got
'=C4*H4' and '=C5*H5' respectively and that will result in wrong value.
2. Show Tabs - This only shows the tabs (not the commands icon).
However, clicking on Tab shows that tab commands. When you start
working on the spreadsheet, the command disappears.
This can also be achieved using 'Collapse the Ribbon' option from the
context menu (right click on the Ribbon) of the Commands bar.
3. Show Tabs and Commands - This is the default display option of the
Ribbon. This displays the tabs and commands always (In India, we call it
24*7 ).
This shows below dialog box. Note that you would not be able to customize the
default tab and its group.
Instead of following above steps, you can also right click on the existing sheet
name and select 'Insert...'
The following dialog box appears. Select Worksheet icon and then click OK.
After you are done with writing new name, simply press Enter key.
You would get a confirmation box like below and then click Delete button.
In the last post, we talked about Excel Worksheet and Workbook. In this post,
we shall learn about formatting and doing other formatting activities related with
cells of Excel worksheet.
The default data type of any cell in excel is 'General', to prove this write any
numeric data in a cell like this.
Now right click that cell and select 'Format Cells...' or simply press CTRL+1 (1
should not be pressed from numeric key pad).
and this shows a Format Cells dialog box. Notice below dialog box picture and
see that Category list has 'General' selected by default.
This means that any cell of the Excel worksheet can accept any type of data and
all are treated as string (however mathematical operations may parse the string
to integer automatically).
Same as above we can also use 'Decrease Decimal' to decrease the decimal
characters.
We can also use other icons from the group for Percent style, Comma Style,
Accounting Number Format.
Apart from Toolbar Icons, we can also use Format Cells dialog box to achieve
same thing.
How to change the color of the cells in Excel?
To change the color of the cells, first select the cell and then use Font group
icons as displayed below. To change the background color, use Fill color icon and
to change the font color use Font Color toolbar icon.
Apart from using Toolbar icons, we can also use Format Cells dialog box and
select Font tab. Look at the picture below.
We can also achieve following formatting using this
Bold
Italic
Underline
Font size
Font style
Strike through
Superscript
Subscript
To clear the cell formats including the cell data, click on 'Clear All'.
This also helps in following
Clear Contents - To only clear the content, not the formatting
Clear Comments - To only clear the comment of that cell (we will learn
how to add comment for the cell later on)
Clear Hyperlinks - In case a string has become hyperlink and we want to
remove the hyperlink, we can use this option.
Templates in Excel
What are templates and how to create a file based on templates in MS Excel?
Notice that the default screen shows some popular templates used however we
are free to search a new template based on our need.
To quickly find a template based on category, use the tags available just below
the Search box. For example, click on Business and you would see your screen
like below that shows list of templates under this category and list of sub
categories in the right panel.
Select any one of them (In this case, we selected Startup Expenses) that shows
another popup with Create button like below.
Clicking Create button creates a new file based on the template and it looks like
below
Now you can simply overwrite different cells value to save your data into this
template.
This should save the template. Now, to use this template first you will
need to close the Template file so close this file from top-right X icon.
4. To create a new MS Excel file based on this created template, go to File >
New and click on PERSONAL tab. This should show the template you have
just created. Simply choose this by clicking it.
5. You should be seeing a new file created based on this template. Now
change the data you want to change and Save this as new MS Excel file.
This opens up Find and Replace dialog box as shown below. Alternatively, we can
also press CTRL+F to open up Find and Replace dialog box.
Enter the data you want to find in your current sheet and click 'Find Next'
button. If the data is found, it selects that particular cell otherwise displays a
message of not found.
: By default Excel is case insensitive that means that it doesn't check whether
the text is written in upper case or lower case.
In case, we need more control over how Excel finds the data we are looking for
then click on 'Options >>' button and it shows like this.
Now click on the cell whose format you want to choose to find the data into.
See that the 'Preview' button changes to the chosen cell format. Now write the
data to find into the Text box and click Find Next button.
The data to find will be searched only to those cells that satisfies the chosen
format.
Quickies
To clear the find format on the Find and Replace dialog box, click on the
Format... dropdown again and then select last option (Clear Find Format).
Quickies
To hide the list of occurrences, simply hold the bottom border of the dialog box
with mouse and drag up. To show again, hold the bottom border of the dialog
box again and drag down.
You may have noticed that almost all options of the Find are available here and
they work exactly the same way.
The only addition in the Replace dialog box is 'Replace with:' textbox, Replace All
and Replace buttons.
Let's try to replace 'FALSE' to '0' using Replace dialog box. Fill the data as it is
written in below dialog box.
Now we have two options to replace data
1. Replace All - to replace all occurences at once
2. Replace - to replace each occurences one by one
Quickies
To close this dialog box, simply press ESC key on the keyboard or press Close
button.
How to go to a specific cell in Excel?
'Go to' is used to go to a specific cell in the spreadsheet.
To open the Go to dialog box, choose 'Go To...' of the 'Find & Select' dropdown
from Editing group on the Ribbon.
This opens up Go To dialog box that looks like below.
Write the Reference of the cell in the text box and click OK. You will be sent to
that particular cell.
If the reference contains the range of cells, all those cells will be selected.
Clicking on Special button opens up 'Go To Special' dialog box.
Go To Special dialog box also helps us in finding a particular cells with specifics
as shown in the picture below.
Let's say, we have a requirement for age data that it should accept data
between 1 to 18 only (in C4 cell). First select C4 cell by clicking on that cell. Now
open 'Data Validation' dialog box by clicking on 'Data Validation' command icon
from 'DATA' tab on the ribbon as shown below and choose 'Data Validation...'
If we want to provide a hint to the user who is entering the data, we can use
'Input Message' tab and fill Title and Input Message text boxes with the hint we
want to show to the user.
Similarly, we can also provide Error message to the user if he/she has entered
wrong data into selected cell. To do this click on 'Error Alert' tab and fill
respective text boxes. Please note that if this tab is not used, Excel gives default
invalid data error alert.
Now, when you press OK.
You are done with the validation of C4 cell. Now this cell should accept only
Integer data between 1 to 18 only.
Let's try to fill this form. As soon as we go to C4 cell, we are presented with the
'Input Message' strings we had filled into the Data Validation dialog box. Look at
the picture below.
If you enter invalid data, you would be welcomed with Validation failed alert
that contains the data you had filled in 'Error Alert' tab.
If you are intelligent enough to enter correct data, you should be quitely
moved to the next cell.
To do this, open Data Validation dialog box and select 'List' from 'Allow'
dropdown. Keep the 'In-cell dropdown' checkbox checked. Now click on the right
side icon of the 'Source' text box.
you would get your screen like this. Now select (select and drag) the source
from where you want to create dropdown items and press Enter key or click on
the right side icon of the text box.
Now click OK on Data Validation dialog box. When you go back to C7 cell, you
would notice a dropdown appears as shown in the picture below that allows user
to select the data for this cell.
If user wants to write other data that is not in the dropdown, he/she gets error
alert.
In the previous post, we learnt about data validations in MS Excel. In this post,
we shall learn how to take print out of Excel worksheet and how to set different
printing settings.
To open the Print dialog box, go to File > Print and you would see a screen
similar to this.
If all the values are showing correct in your dropdown, simply hit Print (the bit
one) button and it goes straight to the printer.
If your system is connected to multiple printers then you have option to select
on which printer you want to send the print. Click on the Printer dialog box and
you should see the list of printers.
Apart from list of printers, we als have following options
1. Microsoft Print to PDF - this converts your sheet into .pdf format
2. Microsoft XPS Document Writer - this converts your sheet into XPS format
3. Send to OneNote XXXX - takes this sheet to OneNote.
To navigate through different pages in the Preview, click on page left and
right arrow that appears at the bottom of the screen.
To print multiple copies, increment the value of the 'Copies:' textbox.
To print specific pages only, you can use Pages: text boxes where you can
write from and to page numbers you want to print.
When you go back to your sheet from Print dialog box, you see a dashed vertical
and horizontal line as shown in the picture below. This indicates that how many
columns are being printed in a page, if you want to adjust the column width you
may do so and this vertical line will help you know whether your columns are
fitting in that page or not. The same applies to the horizontal dashed line. These
lines are just a page indicator to know what data is going in what page.
In case you are printing multiple copies of the worksheet, you may want to use
Collated or Uncollated options.
What is Collated and Uncollated?
Let's assume, we want to print 8 copies of the worksheet.
Collated option will print 1st copy of the entire worksheet and then 2nd copy of
the entire worksheet .... and then 8th copy of the entire worksheet.
Uncollated option will print 8 copies of 1st page, 8 copies of 2nd page, 8 copies of
3rd page etc.
You can select Collated option from 'Collated' dropdown as per your
requirement.
If your page size is custom, click on 'More Paper Sizes...' appearing at the
bottom of this dropdown. This takes you to the Page Setup dialog box. Here
either you select the page size from 'Paper size' dropdown or click on 'Options...'
button that takes you to the Printer Properties dialog box where you can
completely customize the size of the paper.
Here you have complete control over what value you give for different direction
margins. You can also specify margin of the header and footer.
Instead of setting up custom margin through dialog box, we can also do this
visually. Click on the 'Show Margins' icon at the bottom-right corner of the Print
dialog box.
this shows the margin notation on the Preview, use mouse cursor to drag the
margin. Notice that the Margin dropdown value has changed to 'Last Custom...'.
that will show the acutal size of the text that will appear on the printer.
Views
In the previous post, we learnt about how to take print out from MS Excel and
setup page properties. In this post, we shall learn about how to protect a excel
workbook (file) so that it requires a password to open.
To create a password protected file, first open that file in the MS Word and go to
File > Save As. Now click on Browse button that comes when you have selected
Computer in the left panel (Look at the picture below).
On the Save As dialog box, navigate to the folder where you want to save the
file. Give a new name and before you click on Save, click on 'Tools' dropdown
just beside Save button. Choose 'General Options...' from the 'Tools' dropdown.
that will open 'General Options' dialog box as shown below. Here we can create
two passwords
1. Password to open: will be asked when user tries to open the excel file
2. Password to modify: will be asked at the time of opening the file but after
Open password to make sure that this user has modify permission also to
the file. If modify permission is not supplied correctly, the file is opened in
Read Only mode.
You must have noticed a 'Read-only recommended' checkbox above OK button.
This is used to suggest the user that the author of the file has recommended to
open the file in read only mode.
Supply the password (if both Open and Modify password are given, two dialog
box appears) and click OK. Your file should be opened in the Excel.
In case you have checked the 'Read-only recommended' check box, user would
be presented with following alert also.
Next time, you try to open this file you will be presented with the password
dialog box and you will have to enter password to open this.
The benefit with the 1st approach was that you can ask for Open and Modify
password both. Here once the file is open, user will be able to modify the file
also.
Quickies
What is the difference between Open and Modify password?
Answer: No difference as both are password . Okay, the Open
password is the combination of both; Modify and Open. The modify
password is just an extra layer of protection. In case you do not want
everyone to modify the file (for them, the file will open in Read Only
mode) but you want few user having password to modify the file.
In the previous post, we learnt about how to protect a MS Excel file. In this post,
we shall learn how to created Named range, Named constant in MS Excel and
how to edit, delete and use them.
2. The other way is to use the Ribbon bar and Dialog box. Click on 'Define
name' dropdown from 'Formula' tab after selecting the range of cells to
name.
You would see something like this. Now write the Name and hit OK.
How to create a Named constant in MS Excel?
Click on 'Define name' from the Formula tab, you would see 'New Name' dialog
box. Write the Name in the 'Name:' box and constant value in the 'Refers to:'
box.
Click OK. This will create a Named constant that can be used in the formulas.
How to edit, delete named range or named constant in
MS Excel?
To delete, edit named range or named constant click on 'Name Manager'.
To edit, select a Name (row) and click OK. Modify the respective textboxes
values and click OK.
To delete, select any of the formula and click on Delete button.
The benefit of using Named constant here is that if for some reason PPFRate is
changing, we can simply go to that Named constant and change it's value and all
the related cells value will be changed. If this were a direct value instead of
Named constant then we had to go to every cell to update the calculations.
In the previous post, we learnt about Named range and Named constant. In this
post we shall learn about Keyboard shortcuts in Excel.
Keyboard shortcuts are a way to perform frequently used activities quicker with
the combination of keys rather than following few steps through mouse. This
helps in improving the productivity of the user.
The same can be achieved by press Auto sum icon from editing group on the
Ribbon as shown below.
To copy the same formula to other corresponding rows of the records in the
range, we can do any of following
1. Copy the first 'Total' cell that has the formula and hold the bottom-right
corner of the cell from the mouse and drag to other cells.
All the dragged over cell will be filled with the formula and sum will be
displayed like below.
2. Copy (CTRL+C) the first cell where you have written the formula, now
press 'SHIFT+↓' (Down Arrow Key) to select other cells and then press
Enter key.
3. The other way to do this is select the first cell and press 'CTRL+C' and
then use 'SHIFT+↓' (Down Arrow Key) to select other cells and then press
'CTRL+D'.
Thanks for reading. Do share this post to your friends and colleagues.
F1 Key
When you have not opened any dialog box and pressed F1 key, you would see a
default Excel help window. This allows your search for any help or read the
popular articles related with MS Excel.
However, if you happen to open a dialog box and need any help on that dialog
box active tab then pressing F1 would open Help window box focussed to that
active tab items only (Excel is intelligent, isn't it? ).
For example, I had opened Format Cells dialog box and Number tab was active,
when I pressed F1 here is what I see.
F2 key
F2 key brings the cell into Edit mode and moves the cursor to the end of the
content. If the cell contains formula, it shows the formula and selects cells on
which the formula is dependent on.
F3 key
F3 key brings the Paste Name dialog box provided you have already defined
Named range or Named constant.
F4 key
In Edit mode on the cell, it toggle through Absolute, Mixed and Related
references of the cell. For example, if we have to refer D8
1. Relative reference - D8
2. Absolute reference - $D$8
3. Mixed reference $D8 or D$8
We will learn about Cell references in forth coming posts.
F5 key
Opens the 'Go To' dialog box that let us quickly jump to a particular cell or
particular type of cell that contains specific type of data.
Clicking on 'Special...' button shows 'Go To Special' dialog box like below.
Let's think of a requirement where we want to select all the cells having formula
in them. You do not need to roam around all the cell and find them.
Just select 'Formulas' radio button from 'Go To Special' dialog box and hit OK.
You would see all the cells having formulas will be selected
F6 key
Pressing F6 navigates through the next split window in the spreadsheet.
F7 key
Pressing F7 key opens the Spelling dialog box and gives suggestions for the
content written in the selected cell.
F8 key
F8 key toggles the Extended mode in the excel. Extended mode is used to select
cells without dragging or pressing SHIFT key.
Press F8 and press Right Arrow key (→, any other arrow key) and you will notice
that right side cells will get selected. Pressing F8 key again and pressing Right
Arrow key (→, any other arrow key) again will not select cells but will select only
one right side cell.
F9 key
Re-evaluates all formulas of the workbook to ensure that all the cells calculated
value are correct. You must have noticed that MS excel automatically evaluates
the formula whenever any dependent cells value changes. However, we can
change this to 'Manual' mode by going to 'Calculation Options' command from
'Calculation' group under FORMULAS tab of the Ribbon.
Quickies
To bring back the automatic calculation mode, select 'Automatic' from
'Calculation Options' command on the Ribbon.
F10 key
Works as if ALT key is pressed on the keyboard. This shows the shortcut keys to
select a particular tabs on the Ribbon.
As shown above, pressing 'M' key on the keyboard shows the 'FORMULAS' tab
with the shortcuts of each command under FORMULAS tab.
F11 Key
Pressing F11 creates a new Chart sheet based on selected data range. In my
case, I have selected LastName and Age columns.
When I pressed F11 key, I get a brand new sheet with chart.
F12 key
It simply brings 'Save As' dialog box that allows us to duplicate the file and save
with a different name.
Thanks for reading. If you liked it, do share with your friends and colleagues.
Learn about Ribon in Excel here. In this post, we shall learn how to split/divide
the spreadsheet window. This helps us in viewing multiple distant contents of the
spreadsheet.
To split the spreadsheet, first select a cell from where you want to split. In this
case, we have selected D10.
Now go to 'VIEW' tab on the Ribbon and click on 'Split' command under 'Window'
group (as displayed below).
The result screen would be like this. Notice the cross mark (vertical and
horizontal bar) on the spreadsheet, now all 4 window will scroll separately.
How to vertically resize the split window in Excel?
To vertically resize the split window, place your mouse on the vertical bar. Your
mouse cursor would change like below. Now drag by holding the mouse key.
How to horizontally resize the split window in Excel?
Place your mouse cursor on the horizontal bar and your mouse cursor would
change like below. Hold the mouse key and drag and the split window will be
vertically resized.
Quickies
1. To quickly resize split window both vertically and horizontally,
move your mouse cursor at the intersection or horizontal and vertical bar
and your mouse cursor would become like below. Hold the mouse key and
drag.
The resultant screen would look like this.
2. To un-split the window, simply click on the Split command under VIEW
tab on the Ribbon again.
Count() function
Count() function is used to count the number cells between two ranges that
contains numberical data; it doesn't count the cell containing string data.
Let's take below as an example. In 'I4', we have written '=COUNT(A4:G4)', it
count 7 columns data.
The result is only 5 as shown below because only 5 columns (Sl. No., Age,
Salary, PPF, Total) columns having numerical data.
Similarly, we are trying to count the rows that contains numerical data.
As you can see that both A19 and B19 cell is using same formula to count row 3
to 17 but the result would be below.
As A column contains numeric data so it is giving number of rows, but B column
has all string data so the result is 0.
CountIf() function
CountIf function is used to count cells based on one criteria only (less than,
greater than, equal to etc.). The criteria can be either for numerical value
or string value.
Look at the below example. In D21 cell, the formula is written as
'=COUNTIF(D4:D17, "<18")', it means that Count only those cells having value
less than 18 and in this case only one cell D13 valid so the result we are getting
is 1.
CountIfs() function
CountIfs function is used to count cells based on multiple criteria (separated by
comma). In below example, D21 cell contains '=COUNTIFS(B4:B17, "S*",
D4:D17, "<26")' formula that says
count those cells from B4:B17 (cell range) whose string starts with "S*"
(this will give 3 records) and also
D4:D17 cells whose value is '<26' (this will remove two records 'Sheo' &
'Sohan').
So if both criteria is met then only that particular record will be counted.
So the result is 1.
In the previous article, we learnt about Count, CountIf, and CountIfs function in
MS Excel. In this article, we shall learn COUNTBLANK and COUNTA function that
is used to count blank and non-blank cells within given range.
Quickies
Do remember that if the cell is having a blank space (space bar key), Excel
counts that as non blank cell.
In the previous post, we learnt about counting blank and non blank cells in
Excel. In this post, we shall learn how to count logical and mixed logical values
in MS Excel.
The result is 6.
In the previous post, we learnt about counting logical and bit values in Excel. In
this post, we shall learn about sum range of cells value in Excel.
Sum function
To sum/add a range of cells in MS Excel, we can use SUM function. SUM function
can either by used by directly writing in the cell or by clicking on Sum command
from the 'Editing' group under 'HOME' tab on the Ribbon.
So the formula to sum E2 to E5 columns values are '=SUM(E2:E5)'.
SUM BY CLICKING ON THE RIBBON
SUM BY DIRECTLY WRITING IN THE CELL
Here we are adding the values of E2 to E5 cells and the result is shown below.
SumIf function
Like CountIf function, SUMIF function is also used to sum the range of cells
based on one criteria. In below example, we are adding value of E column only
when the cell value is more than 350.
The criteria is written in double quote as 2nd parameter. Instead of passing 2nd
parameter as greater than, less than or equal to, we can also put criteria based
on other cell range.
For example, we want to add the E column value only when its corresponding B
column value is "Ram". To do this, we have written formula as '=SUMIF(B2:B5,
"Ram", E2:E5)' ie. Add the value from E2 to E5 only when B2 to B5 value
contains "Ram".
SumIfs function
If our requirement is to use multiple criteria while summing the range of cells,
we can use SumIfs function.
So in below example, we want to sum the value of E column only if B column
value is "Ram" and C column value is "Sita". So our formula will be
'=SUMIFS(E2:E5, B2:B5, "Ram", C2:C5, "Sita")'.
Here
1. E2 to E5 is sum range
2. B2:B5 is criteria 1 range
3. "Ram" is the criteria value of B2:B5
4. C2:C5 is criteria 2 range
5. "Sita" is the critera value of C2:C5
Similarly, we can specify more than 2 criteria also to sum range of cells.
Thanks for reading, if this helps do share to your friends and colleagues.
In previous post, we learnt about Sum, SumIf and SumIfs function in Excel. In
this post, we shall learn about SUMPRODUCT, SUMSQ function in MS Excel.
SumProudct function
SUMPRODUCT function in Excel is used to sum the products (multiplication) of
corresponding ranges.
In below example, we want to get the total amount spent, so in D6 cell we have
written '=SUMPRODUCT(C3:C5,D3:D5)' so it does following
1. multiply C3 to D3 and add that value to
2. multiple of C4 to D4 and add that to
3. multiple of C5 to D5
So it basically multiplies the corresponding value of C columns to D columns and
gives the result.
The benefit we got is that we do not need to have a separate column (We have
kept E column just for clarity purpose) to multiple Rate and Qty and then add it.
Thanks for reading, if you liked it do share to your friends and colleagues.
SumsQ function
SUMSQ function is used to sum the square of the given range. In below
example, we have written '=SUMSQ(D3:D5)' formula in D6 cell that squares the
value of D3 to D5 cells and add.
Here is the result.
The E column is just for reference purpose.
Like to SUMSQ we have
1. SUMX2MY2 - used to sums the difference between the squares of two
corresponding given ranges
2. SUMX2PY2 - used to return the sum total of the sums of the squares of
numbers in two corresponding given ranges
3. SUMXMY2 - used to return the sum of squares of the differences in two
corresponding given ranges
As there are not very frequently used so no explanations are provided in this
post.
If Function
IF is a conditional function that returns one value based on whether the
condition is valid or not. In below example, F column should have a value (Adult
or Minor) based on E column data (Age), so the formula we have written in F
column is '=IF(E3>18, "Adult", "Minor")'.
i.e.
For row 3, it checks if E3 column value is more than 18 then writes 'Adult' else
'Minor'. The same formula has been copied for other rows. The result is below.
Nested IF Function
IF function can be nested within another IF. Look at below example.
In I3 cell, the 1st parameter is the IF function is again an IF function that returns
TRUE/FALSE based on E3 value and then writes 'Major' or 'Minor' in the cell.
When we copy the same formula to other rows, the result would be like this.
AND Function
AND function returns
1. TRUE if all conditions are valid
2. FALSE even if one condition is invalid
Look at the example below. Here we have written '=AND(E3>18,F3>18)' in F3
cell that checks the value of E3 and F3. If both are greater than 18 then writes
TRUE else FALSE.
The return value of 'AND' function can be used inside another function as well.
Look at the example below.
In G3 cell we have written '=IF(AND(E3>18,F3>18), "Correct", "Incorrect")', it
first checks E3>18 and F3>18, if both are valid then returns TRUE
otherwise FALSE
IF function then checks the return value of AND function and if it is TRUE,
writes 'Major' otherwise 'Minor'.
The same formula has been copied into G column cells as well and here is the
result.
OR Function
OR function returns
Look at H6 cell, here E6 returns TRUE but F6 returns FALSE. Even if 1 condition
is FALSE, OR function returns TRUE and the result is 'Correct'.
In previous post, we learnt about If, And, Or functions in Excel. In this post, we
shall learn about Date and Time functions in MS Excel.
MONTH function
MONTH function returns the month number from 1 (January) to 12 (December)
from a validate date. E3 contains '=MONTH(B3)' formula that returns '8' as
month from B3 cell value.
YEAR Function
YEAR function is used to return year (1900 to 9999) from a valid date. F3 cell
contains '=YEAR(B3)' formula that returns '2016' as year from B3 cell value.
MINUTE function
MINUTE function is used to return minute 0 to 59 from a valid time or date time.
H3 cell contains '=MINUTE(B3)' formula that returns '16' as minute from B3 cell
value.
SECOND function
SECOND function is used to return second 0 to 59 from a valid time or date
time. I3 cell contains '=SECOND(B3)' formula that returns '25' as second from
B3 cell value.
Even if B3 cell doesn't show second segment, Second is returned from the
current time while writing the formula as B3 cell contains '=NOW()'.
To create a new date based on existing date segments, we can use DATE
function. In D4 cell, we have written '=DATE(YEAR(B4)+5, MONTH(B4)+3,
DAY(B4)+2)' formula that
1. adds 5 into B4 year
2. adds 3 into B4 month
3. adds 2 into B4 day
and gives a fresh date '12/26/82' based on '9/24/77'.
like DATE, we have TIME function as well. TIME function can be used to get time
based on other time values.
TIME function
Time function can be used to create a valid time based on integer numbers
within time range. For example, G4 cell contains '=TIME(G3+2, H3+3, I3+3)'
that
1. adds 2 into G3 value
2. adds 3 into H3 value
3. adds 3 into I3 value
and gives a fresh time '5:27 PM'.
When the value is a valid date and format is valid format, TEXT function is
intelligent enough to derive corresponding names of those date segments.
To get next month last day, use '=EOMONTH(B1, 1)' that will return last
day of September ie. 30-Sep-2016.
To insert more than 1 space use multiple blank space between double quotes
like " ".
LEFT function
LEFT function in Excel is used to return the specified number of characters from
start of a string. See E3 cell, we have written '=LEFT(D3, 5)' that returns 'Sheo '
(with space).
The same formula has been copied to other E cells to bring above result.
RIGHT function
RIGHT function in Excel is used to return specified number of characters from
the end of string. E3 cell in below example has '=RIGHT(D3, 5)' formula that
returns 5 characters from the end of string of D3 cell.
The same formula has been copied to other E cells.
MID function
MID function in Excel is used to return the characters from the middle of string
by giving starting position and length of characters to return.
E3 cell in below example has '=MID(D3, 3, 5)' that returns string starting from
3rd position to next 5 characters.
FIND function
FIND function in Excel is used to return the starting position of the 1 st occurence
of a substring within another string. FIND is a case-sensitive function ie. "an" is
difference than "AN".
E3 cell in below example contains '=FIND("an", D3)' formula that finds "an" at
the 11th position, so the result is 11.
If FIND function can't find the specified substring, it throws "#VALUE!" error as
shown above.
SUBSTITUTE function
SUBSTITUTE function in Excel is used to replace a part of text with new text in a
string. E3 cell in below example contains '=SUBSTITUTE(D3, " ", "|")' formula
that replaces " " (blank space) with "|" (pipe sign).
SUBSTITUTE function is also case-sensitive.
In the previous post, we learnt about LEFT, MID, RIGHT, FIND and SUBSTITUTE
function of Excel. In this post we shall learn how to count the number of words
in a cell of Excel worksheet.
Let's solve this problem three simple step.
Step 1: Count the total length of string
To count the total length of string we shall use the LEN function of Excel. In D3
cell we have written '=LEN(TRIM(C3))' function that first trims any space before
and after the cell data and then gives the length of the string.
In the previous post we learnt about how to count number of words in Excel. In
this post, we shall learn how to change the case of a string (upper, lower or
proper case) in Excel.
UPPER function
To change string to upper case, we can use UPPER function. In B3 cell, we have
'=UPPER(A3)' formula that changes the A3 cell string to upper case.
Here is the result.
LOWER function
To change string to lower case, we can use LOWER function. In C3 cell, we have
'=LOWER(A3)' formula that changes the A3 cell string to lower case.
Here is the result.
PROPER function
To change string Proper case (1st character of each word will be in capital letter),
we can use PROPER function. In D3 cell, we have written '=TRIM(PROPER(A3))'
that first removes empty space from start and end of the string and then
changes the string into Proper Case.
Here is the result.
Views: 17
In the previous post, we learnt about how to change string to upper, lower and
proper case in Excel. In this post, we shall learn how to compare two strings
(case sensitive and case insensitive) in Excel.
When we copy the same formula to other C cells, we get above result.
When we copy the same formula to other D cells, we get above result.
6 | Post O
The same formula has been copied to other C column cells that gives above
result.
To get Last Name, we have written '=RIGHT(B3,LEN(B3)-FIND(",",B3)-
1)' formula in D3 cell that
finds the position of "," and deduct 1 and then deduct the resultant
number from total length of the string
takes the resultant number of characters from end of the string
using RIGHT function.
The result is all characters from ending of the string till comma (,), this gives the
Last Name of the person.
The same formula has been copied to other D column cells that gives above
result.
This opens up 'Convert Text to Columns Wizard' as shown below. In this wizard,
select the file type/data type we have to convert to. We have comma delimited /
separated data so let the 1st radio button selected.
Now select the delimited character from 'Delimiters' list. As our data is 'Comma'
separated so check the 'Comma' checkbox. We get preview of our final data
below under 'Preview' box. If it is looking good press 'Next >' else adjust the
data or Delimiters.
Now, choose the data type of each column. Select column heading and then
choose the data type from 'Column data format' heading to format that column
data.
Now press 'Finish' button to show the formatted data at the same place like
below.
Quickies
If we want formatted data to appear at some other location, click right side icon
of 'Destination' textbox and select the target cell. Now, clicking 'Finish' will bring
the formatted data to the new location.
Find vs Search function in Excel
What is the difference between Find and Search function in Excel and how to use them?
In previous post, we learnt about Text to Columns in Excel for CSV data. In this
post, we shall learn the difference between FIND and SEARCH function in Excel
and where to use what?
FIND function
Look at below example. In B2, we have '=FIND("JOHN", A2)' formula that
returns '#VALUE' as FIND couldn't find the exact value ('JOHN') in A2 cell.
(FIND is case-sensitive function).
SEARCH function
When we pass the same parameters in SEARCH function, we get '1'. So our
formula in C2 is'=SEARCH("JOHN", A2)'. As SEARCH function is case-
insensitive, as long as text to find is same (either upper or lower or mixed
case), it returns the position of the text found in A2 cell.
See the similar examples below for FIND
and SEARCH
Quickies
Can we also use '*' wildcard character instead of '?' - Yes
In previous post, we learnt the difference between Find and Search in Excel. In
this post, we shall learn about VLOOKUP and HLOOKUP functions in Excel.
VLOOKUP function
VLOOKUP (Vertical lookup) function is used to look for a value in the main table
and return corresponding value from the lookup table.
In this example, we want to write the 'Emp Type Name' in C column based on B
column value from the Lookup table from E2 to F6.
The formula in C2 is '=VLOOKUP(B2,$E$3:$F$6,2,FALSE)' that executes in
following way
1st parameter - lookup value
2nd parameter - lookup table range (notice that the range is in absolute
reference)
3rd parameter - column index to use to write the value
4th parameter - approximate match (TRUE) or exact match (FALSE)
Notice that EmpTypeId = 1 is 'Manager' in the Lookup table so the VLOOKUP
function returns 'Manager' in C2 cell.
When we copy the same formula to other C cells, we get above result.
HLOOKUP function
This is almost same as VLOOKUP except the fact that the Lookup table values
are horizontally arranged.
In C11 cell, we have '=HLOOKUP(B11,$F$10:$I$11, 2,FALSE)' formula that does
following
1st parameter - lookup value
2nd parameter - lookup table range (notice that the range is in absolute
reference)
3rd parameter - row index to use to write the value
4th parameter - approximate match (TRUE) or exact match (FALSE)
The EmpTypeId (B11) is 1 so the Lookup table EmpTypeId = 1 is 'Manager of
CEO' so we have this in the C11 cell.
When we copy the same formula to other C cells, we get above result.
MAX function
MAX function in Excel is used to return the largest value in the set of values. It
ignores the textual or logical values.
In C2 cell, the formula is '=MAX(B2:B6)' that gets the maximum values between
B2 to B6 by ignoring any textual and logical values.
PMT function
Get monthly installments for loan
The PMT function helps in getting payment amount (installment) of a loan. It
accepts at least 3 parameters and they are
1. rate - interest rate, as the yearly interest rate is 9.75 so monthly will be
(0.75/12)% ie. 0.008125.
4. [fv] (Optional) - the future value of the loan, we want to completely pay
off so it will be 0
RATE function
Get interest rate of the loan
Similar to above, if we want to know what would be the interest rate, if we want
to borrow certain amount, for certain period of time and we want to pay a
certain amount every month then we can use RATE function.
In B4 cell, we have '=RATE(C2,A2, D2, E2)' formula where
C2 is Nper (number of months we want to pay)
A2 is monthly payment we want to make
D2 is the amount of money we want to borrow
E2 is the value left after paying
The result would look like this. In general result come in full number, simply
use cell formatting to display decimal numbers.
NPER function
Get period (in months) of a loan
Let's say we want to know the period (in months) we will have to pay if we
borrow certain amount at certain interest rate and we want to pay certain
amount every month, then we can use NPER function.
In C4 cell, we have '=NPER(B2,A2,D2,E2)' formula where
B2 is rate of interest
A2 is monthly installment we want to pay
D2 is amount we want to borrow
E2 is the amount left after paying installments
Here is the result.
PV function
Get how much we can borrow
Let's assume that you want to know that if you pay certain amount every
month, till certain period of months with certain interest rate then how much
amount you can borrow? We will need to use PV function.
In D4 cell we have '=PV(B2,C2,A2,E2)' formula where
B2 is the rate of interest
C2 is the number of months we want to pay
A2 is the amount we want to pay every month
E2 is the left over amount after paying
Here is the result.
FV function
Get if you can pay off loan after paying only certain amount every
month
Let's assume a scenario where you want to know that what if you pay only
certain amount every month, with a certain interest rate for a certain amount of
loan, whether you will be able to pay off the entire loan? To know this we can
use FV function
In E4 cell, we have '=FV(B2,C2, A2,D2)' formula where
B2 is the loan rate of interest
C2 is the period in months we want to repay
A2 is the amount we are willing to pay every month
D2 is the loan amount we want to borrow
and here is the result.
Notice that slight change (only 753.49 less amount) in the Payment amount
(installment) results in huge left over amount (5,53,971.31).
Here you must be knowing the magic of cummulative interest. The same applies
when you save money every month !
Excel treat all payment as negative amount and all receipt as positive amount.
So when we are paying monthly installment, its negative amount in the formula.
What if I had invested
To get the maturity amount again, we shall use FV function of Excel. Look at
below scenario, where we are assuming that I would
invest 1000 a month (this should be negative amount as we are paying)
for 10 years
and assuming I will get 8.75% interest per year
In B9, we have entered formula '=PV(B6/12,B5*12,B4)' where
1st parameter is B6/12 that is interest rate (B6/12 as 8.75% is the yearly
rate of interest)
2nd parameter is B5*12 that is term in year (B5*12 as term is in year and
installment is monthly)
3rd parameter is B4 is monthly payment
and the result is 190,802.98.
Total amount invested is '12*10*1000=120,000' and you end up gaining
'79,791.42'.
Annuity investment
Let's say that we want to buy an annuity plan that will pay us 1000 every month
for next 10 years at the rate of 8.75%, how much we need to invest?
To calculate the annuity amount, enter '=PV(B6/12,B5*12,B4)' formula in B12,
here
1st parameter is B6/12 that is interest rate per month
2nd parameter is B5*12 that receipt per month
3rd parameter is B4 that is payment per month
and the result is 79,791.42.
Thanks for reading, if this helps do share to your friends and colleagues.
If you are a rookie of Microsoft Excel, you have no choice but only have
to copy the data of every sheet and paste them in to a new workbook
one by one and applying the Move or Copy command. Using the Move
or Copy command will help you export or copy one or several
worksheets to a new workbook quickly.
1. Open all workbooks that you want to merge into a single workbook.
2. Select all of the worksheet names of a workbook in tab bar. You can
select multiple with holding down Ctrl key or Shift key. Right click
the worksheet name, and click the Move or Copy from context menu.
3. In Move or Copy dialog box, select the master workbook that you
want to merge other workbooks into from the drop down list of Move
selected sheets to book. And then specify the location of the merged
worksheets. See screenshots:
4. Then click OK. The selected worksheets have been moved to the
master workbook.
5. Repeat the steps from 2 to 4 to move other workbooks to the master
workbook. Then it combines all worksheets of opened workbooks into
a single workbook. See screenshots: