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

Data Analytics Lab Exercise

Data Analytics

Uploaded by

Mansoor ahmed
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)
54 views28 pages

Data Analytics Lab Exercise

Data Analytics

Uploaded by

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

DATA ANALYTICS - LAB

EXERCISE - 1

Macros are advanced features that can speed up editing or


formatting you may perform often in a Word document. They record
sequences of menu selections that you choose so that a series of actions can
be completed in one step.
Recording A Macro
To record a macro, follow these steps:

 Click Tools|Macro|Record New Macro on the menu bar.

 Name the macro in the Macro name field. This name cannot contain spaces
and or begin with a number.
 From the Store macro in drop-down box, select the document you would
like the macro to be associated with or choose "All Documents" be able to
use the macro in any document.
 Enter a description of the macro in the Description field. This is for your
reference only so you remember what the macro does.
 Click OK to begin recording.
 Select options from the drop-down menus and Word will record the options
you choose from the dialog boxes, such as changing the margins on the Page
Setup window. Select only options that modify the document. Word will not
record toggle actions such as View|Toolbars that have no effect on the
document itself.
 The recording toolbar will allow you to stop, pause, and resume recording.

 Click the Stop button the recording toolbar. The macro is now saved.
DATA ANALYTICS - LAB

Running A Macro
To run an existing macro, follow these steps.
Select Tools|Macro|Macros from the menu bar
From the Macros window, highlight the Macro name in the list and click Run.
If the macro is long and you want to stop it while it is running, press BREAK
(hold CTRL and press PAUSE).
DATA ANALYTICS - LAB

EXERCISE - 2

How to use Subtotals


Nested Level Subtotals are used to subtotal
more than one level of data. For this
example our list of data contains individual
payers and semesters

STEP:-1Select any cell within your range of data


DATA ANALYTICS - LAB

STEP:-2 Select Subtotal on the Data tab.

The Subtotal dialogue box will open.

STEP:-3 For the At Each Change in dropdown menu, select Semester.


STEP:-4 Choose to Use Function, Sum.
STEP:-5 Choose to Add Subtotal To, Amount Paid.
STEP:-6 Select any cell within your range of data.
STEP:-7Select Subtotal on the Data tab.

The Subtotal dialogue box will open.

STEP:-8 For the At Each Change in dropdown menu, select Semester.


STEP: -9 Choose to Use Function, Sum.
STEP: -10 Choose to Add Subtotal To, Amount Paid.

STEP:-11 Click Ok.


DATA ANALYTICS - LAB

The first level of subtotal will be added to the data.

OUTPUT
DATA ANALYTICS - LAB

EXERCISE - 3

Convert the following text into columns

Name,Age,Place,Country
GPM,38,Adoni,India
XYZ,42,Newyork,USA
ABC,55,Beijing,China
IJK,45,Singapore,China
TYR,65,Tokyo,Japan

Step 01: Enter the above data in the column A


Step 02: In the menu tab select data tab
Step 03: Select text to columns tool in the data tools group
Step 04: Choose the file type as shown in the following image

Step 05: In the wizard select the delimiters contains in the data (refer the following image)

Step 06: Select the next tab and select the options if required and click on the finish tab
DATA ANALYTICS - LAB

Result:
Name Age Place Country
GPM 38 Adoni India
XYZ 42 Newyork USA
ABC 55 Beijing China
IJK 45 Singapore China
TYR 65 Tokyo Japan
DATA ANALYTICS - LAB

EXERCISE - 4

How to Protect the Excel file via Macro

Step:- 1 open Excel sheet

Go to developer tool

Click to Macro

Step:-2 click to insert button it will be open small dropdown list then click to Module

Step:-3 click on Module 1


DATA ANALYTICS - LAB

Step:-4 write to program sub rotten function

Msgbox “welcome”

a= input box (“enter the password “)

if a =123 then

Msgbox “welcome”

Else

Msgbox”incorrect password “

This work book.save

This work book .close

End if

End sub

Step:-5 Then click to Debug it will open popup window then select step into (F8)
DATA ANALYTICS - LAB

Step :- 6 Then click run button

Out put

Step:- 7 Then click ok


DATA ANALYTICS - LAB

EXERCISE - 5

DATA VALIDATION

We can restrict a user to enter a whole number between 0 and 10.Execute the Below
mention steps for the creation of the data validation rule in excel:

Step 1: Select B2 Cell.

Step 2: Go to the Data tab, click on Data Validation from Data in the toolbar.

Step 3: A data validation Pop-Up will open:


DATA ANALYTICS - LAB

Step 3.1: On the Settings tab, Click on Allow drop-down under validation Criteria.

Step 3.2: Select the Whole number, then Some more required options will be enabled.

Step 3.3: Select between from the drop-down of the Data list, Enter the Minimum and

Maximum number for restriction. And click ok.


DATA ANALYTICS - LAB

Step 3.4: All settings will apply to the selected cell. Now Enter 1 in cell B2- It will allow a
user to enter any whole number from 0 to 10.

OUTPUT

Now Enter 11 in cell B2- It will throw by default error.


DATA ANALYTICS - LAB

EXERCISE - 6

SUMIF FUNCTION

There are the table with the data about the provision of services to clients from different cities
with the contract numbers.

Let`s suppose we need to calculate to the number of services in a certain city with taking into
account the type of service. How to use the SUMIFS function in Excel:
PROCEDURE

Step:1
You need to call the «Insert Function » (keys SHIFT+F3). In the «Math & Trig» category we
find SUMIFS. You can put the equal sign in the cell and start typing the name of the function.
Excel will show a list of functions that have in the name such title. We select the required
DATA ANALYTICS - LAB

function by double-clicking of the mouse or simply move to the cursor by arrow on the
keyboard down to the list and press the TAB key

STEP:2
There is the summation range is the range of cells with the number of services provided. As the
first argument you need to choose the «Quantity» (Е2:Е11) column. The name of the column
does not need to be included.
Step:3
First condition that must be met when finding the amount – is a certain city. The range of cells
for checking condition 1 – is the column with names of cities (С2:С11). The condition 1 – is
the name of the city for which you need to sum up the services. Let's say is «Rochester». The
condition 1 – is the reference to a cell with a name of a city (C3).
Step: 4
For the accounting of the services` type, we set the second range of conditions - the «Service»
column (D2:D11). The condition 2 – is the reference to a particular service. In particular, is the
service 2 (D5)
Step: 5
Here is the formula with two conditions for summation:
=SUMIFS (E2:E11,C2:C11,C3,D2:D11,D5)
DATA ANALYTICS - LAB

OUTPUT:-

The result of the calculation is 68:


DATA ANALYTICS - LAB

EXERCISE - 7

HOW TO USE TEXT FUNCTIONS


The data that you obtain from different sources many not be in a form ready for
analysis. In this chapter, you will understand how to prepare your data that is in
the form of text for analysis.
Initially, you need to clean the data. Data cleaning includes removing unwanted
characters from text. Next, you need to structure the data in the form you require
for further analysis.
Consider the following example

This is the raw data that you have obtained on product information containing the Product ID,
Productdescription and the price. The character “|” separates the field in each row.
When you import this data into Excel worksheet, it looks as follows –
 Finding required text patterns with the text functions.
 Extracting data values from text.
 Formatting data with text functions.
 Executing data operations with the text functions. Removing Unwanted
Characters from Text

When you import data from another application, it can have nonprintable
characters and/or excess spaces. The excess spaces can be −

 leading spaces, and/or


 extra spaces between words.
If you sort or analyze such data, you will get erroneous results.
DATA ANALYTICS - LAB

As you observe, the entire data is in a single column. You need to structure this
data to perform dataanalysis. However, initially you need to clean the data.
You need to remove any nonprintable characters and excess spaces that might be
present in the data. You can use the CLEAN function and TRIM function for this
purpose.

S.No Function & Description

1 CLEAN: Removes all nonprintable characters from text


.

TRIM : Removes spaces from text


2
.

 Select the Cells C3 – C11.


 Type =TRIM (CLEAN (B3)) and then press CTRL +
Enter.The formula is filled in the cells C3 – C11.
DATA ANALYTICS - LAB

output
DATA ANALYTICS - LAB

EXERCISE - 8

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’.


DATA ANALYTICS - LAB

5. Click on the ‘Add’ button.

6. Click OK.

7. The above steps would add the Form icon to the Quick Access Toolbar.

.OUTPUT
DATA ANALYTICS - LAB

EXERCISE - 9

VLOOKUP

In the above spreadsheet, to find out the Employee Salary which we don know We will enter
the Employee Code

How to use VLOOKUP function in Excel

Following is a step-by-step guide on how to apply the VLOOKUP function in Excel:

Moreover, By Applying VLOOKUP, value(Employee’s salary) of the corresponding


Employee’s Code will be displayed.
DATA ANALYTICS - LAB

Navigate to the cell where you want to view We need to navigate to the cell where you want
to view the Salary of the particular Employee.- (in this instance, Click the cell with index ‘H3’)

Enter the VLOOKUP function =VLOOKUP ()

Enter the VLOOKUP Function in the above Cell: Start with an equal sign which denotes that
a function is entered, ‘VLOOKUP’ keyword is used after the equal sign depicting
VLOOKUP function =VLOOKUP ()

The parenthesis will contain the Set of Arguments (Arguments are the piece of data that
function needs in order to execute).

VLOOKUP uses four arguments or pieces of data:


DATA ANALYTICS - LAB

First Argument – Enter the lookup value for which you want to look up or search.
The first argument would be the cell reference (as the placeholder) for the value that needs to
be searched or the lookup value. Lookup value refers to the data which is already available or
data which you know. (In this case, Employee Code is considered as the lookup value so that
the first argument will be H2, i.e., the value which needs to be looked up or searched, will be
present on the cell reference ‘H2’).

Second Argument – The table array It refers to the block of values that are needed to be
searched. In Excel, this block of values is known as table array or the lookup table. In our
instance, the lookup table would be from cell reference B2 to E25, i.e., the complete block
where the corresponding value would be searched.

NOTE: The lookup values or the data you know have to be in the left-hand column of your
lookup table, i.e., your cell range.

Step 5) Third Argument – VLOOKUP syntax is the column index no It refers to the column
reference. In other words, it notifies VLOOKUP where you expect to find the data, you want
to view. (Column reference is the column index in the lookup table of the column where the
corresponding value ought to be found.) In this case, the column reference would be 4 as the
Employee’s Salary column has an index of 4 as per the lookup table.
DATA ANALYTICS - LAB

Step 6) Fourth Argument – Exact match or approximate match


The last argument is range lookup. It tells the VLOOKUP function whether we want the
approximate match or the exact match to the lookup value. In this case, we want the exact
match (‘FALSE’ keyword).

1. FALSE: Refers to the Exact Match.


2. TRUE: Refers for Approximate Match.

Step7) Press Enter!

Press ‘Enter’ to notify the cell that we have completed the function. However, you get an error
message as below because no value has been entered in the cell H2i.e. No employee code has
been entered in Employee Code which will allow the value for lookup.

OUTPUT:-.

However, as you enter any Employee Code in H2, it will return the corresponding value i.e.
Employee’s Salary.
DATA ANALYTICS - LAB

EXERCISE -10

How to Sending Google Drive files to others


Google Drive files send to others Below is a step-by-step guide on how to do it:
Step 1: Access Google Drive
- Go to the Google Drive website (drive.google.com) or open the Google Drive app on your
device.

Step 2: Sign in to your Google Account


- If you are not already signed in, enter your Google Account credentials to log in.

Step 3:Open the Google Drive


- Navigate through your Google Drive.

Step 4: Select the File or Folder


- Click on the file or folder to highlight it. If you want to select multiple items, hold down the
"Ctrl" key (Windows) or "Command" key (Mac) while clicking on the files/folders.
DATA ANALYTICS - LAB

Step 5: Share the File or Folder


- Right-click on the selected file(s) or folder(s). A context menu will appear.
Step 6: Choose "Share" from the Context Menu
- Click on the "Share" option from the context menu. A sharing dialog box will pop
up.

Step 7: Enter Recipient(s) Email Address In the sharing dialog box, enter the email addresses
of the people you want to share the file(s) or folder(s) with.

Step 8: Add a Message (Optional)


- If you want to include a message to the recipients, you can do so in the message box
provided.
DATA ANALYTICS - LAB

-
Step 9: Set Sharing Permissions (Optional)
- In the sharing settings, you can choose whether the recipients can view, comment on, or edit
the file(s) or folder(s). You can also set the visibility to "Anyone with the link" if you want to
share the link with others without requiring them to sign in.
Step 10: Send the Invitation
- Once you've set the sharing settings and added a message (if desired), click on the "Send"
button to send the invitation to the selected recipients.

Output
That's it! You have successfully shared Google Drive files or folders with others.

You might also like