0% found this document useful (0 votes)
277 views16 pages

Practical Sem VI Printout

Here are the steps to display the data as per the requirements: 1. Format the cells as per the data type: 1. Format columns A to D as Text 2. Format columns E to G as Number 2. Adjust column widths for proper display: 1. Adjust column A width to 15 2. Adjust column B width to 5 3. Adjust column C width to 5 4. Adjust column D width to 10 5. Adjust column E width to 8 6. Adjust column F width to 8 7. Adjust column G width to 8 3. Add borders: 1. Select cells A1:G12 2. Go to Home tab > Styles group >

Uploaded by

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

Practical Sem VI Printout

Here are the steps to display the data as per the requirements: 1. Format the cells as per the data type: 1. Format columns A to D as Text 2. Format columns E to G as Number 2. Adjust column widths for proper display: 1. Adjust column A width to 15 2. Adjust column B width to 5 3. Adjust column C width to 5 4. Adjust column D width to 10 5. Adjust column E width to 8 6. Adjust column F width to 8 7. Adjust column G width to 8 3. Add borders: 1. Select cells A1:G12 2. Go to Home tab > Styles group >

Uploaded by

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

Practical no 1

Prepare a worksheet containing the Name and taxable income in columns A and B
respectively from rows 1 to 6, the first row contains the headings and the remaining rows
contain the data. Use your own data.
Carry out the following operations on this worksheet.
1. Save the worksheet under your name followed by your roll no. , question no. e.g.
MONA1232
2. Obtain the income tax in column C using the following income tax slabs.
Taxable Income(Rs) Rate
First 1,00,000 Nil
Next 60,000 10%
Next 70,000 20%
Excess 30%
3. Obtain the surcharge in column D, where surcharge is 3% of the income tax for those
whose taxable income is above Rs 5,00,000
4. Obtain the total tax in column E, as the sum of income tax and surcharge.

Solution:
Saving the worksheet:
1. After typing in the data in columns A and B, click on the office button and select
‘Save as’.
2. Select Excel workbook, type the name as ‘MONA1232’(i.e. name and roll number,
then 2 for the question no.) and click on save.
Income tax
1. Select C1 and type the heading ‘INCOME TAX’.
2. Select C2 and type
=IF(B2<=100000,0,IF(B2<=160000,(B2-100000)*10%,IF(B2<=230000,
60000*10%+(B2-160000)*20%,60000*10%+70000*20%+(B2-230000)*30%)))
and press enter.
3. Select C2 and drag the fill handle to C6
Surcharge
1. Select D1 and type the heading ‘SURCHARGE’
2. Select D2 and type =IF(B2>500000,C2*3%,0) and press enter.
3. Select D2 and drag the fill handle to D6
Total Tax
1. Select E1 and type the heading ‘TOTAL TAX’
2. Select E2 and type =C2+D2 (or =SUM(C2:D2) and press enter.
3. Select E2 and drag the fill handle to E6
Practical no 2
DATE AND TIME FUNCTIONS

DATE()

The DATE function returns the sequential serial number that represents a particular date. For
example, the formula

=DATE(2008,7,8)

returns 39637, the serial number that represents 7/8/2008.

DATEVALUE()

gives serial number for given date text. Date-text means date in quotes.

e.g =DATEVALUE(“1-JAN-1900”) GIVES 1

DAY()

Returns the day of a date, represented by a serial number. The day is given as an integer
ranging from 1 to 31.

=DAY(“25-DEC-2009”) gives 25

MONTH():-

Gives month of the year for the given serial number or date-text

e.g =MONTH(“25-dec-2009”) gives 12 (December=12)

Answer of the function is numeric.

YEAR()

Gives year of the year for the given serial number or date-text

e.g =YEAR(“25-dec-2009”) gives 2009

Answer of the function is numeric and it is always 4 digits.

WEEKDAY()

Gives day of the week for the given serial number or date-text

e.g =WEEKDAY(“03-feb-2016”) gives 4 (Wednesday=4)


DAYS360()

Gives number of days between two given dates based on an assumption that there are 360
days in a year i.e. 12 months of 30 days.

e.g =DAYS360(“1-JAN-2020”,”1-FEB-2020”) GIVES 30

CORREL()

this function returns the correlation coefficient of the array1 and array2 cell ranges. use the
correlation coefficient to determine the relationship between two properties.

Syntax

CORREL(array1,array2)

Answer of the function is numeric

TIME()

Gives time in HH:MM AM/PM form (12 hrs.) for given time. You have to give time as per
24hrs clock with HH/MM/SS

e.g =TIME(18,30,45) gives 6:30 PM

TIMEVALUE()

This function is used to get serial number for time-text.Time-text means time in quotes.

e.g =TIMEVALUE(“6:00 PM”) gives 0.75

TODAY()

This function is used to get the current date generally date will be in American format

e.g =TODAY() gives 02/03/2016

NOW()

This function is used to get the current date as well as current time. Generally date will be in
American format and time as per 24 hrs clock.

e.g=NOW() gives 02/03/2016 18:00


TEXT FUNCTIONS
LEFT()
This function is used to find the characters from the left side of the string by default it gives
one character from the left side
e.g =LEFT(“VIVA COLLEGE”,4) gives VIVA

RIGHT()
This function is used to find the characters from the Right side of the string by default it gives
one character from the Right side
e.g =RIGHT(“VIVA COLLEGE”,4) gives LEGE

MID()
This function is used to find the character from middle of the string from mth characters and
gives n number of characters
e.g =MID(“VIVA COLLEGE”,4,3) gives A C

UPPER()
This function is used to convert lowercase alphabets in to uppercase
e.g =UPPER(“viva college”) gives VIVA COLLEGE

LOWER()
This function is used to convert uppercase alphabets in to lowercase
e.g =LOWER(“VIVA COLLEGE”) gives viva college

PROPER()
It is used to capitalized the first alphabet in a text string and any other alphabet in the text that
follows any non-alphabetic character; converts all other alphabets into lowercase
e.g =PROPER(“VIVA COLLEGE”) gives Viva College

LEN()
This function is used to find length of a string
e.g =LEN(“VIVA COLLEGE”) gives 12

TRIM()
This function is used to remove all the blank spaces except single blank space between two
words
e.g =TRIM(“VIVA COLLEGE”) gives VIVA COLLEGE

FIXED()
This function is used to round a number to the specified number of decimals, formats the
number in decimal format using a period and commas and return the result as text. By default
no. of decimals are two and no_commas is false.
=FIXED(13333.333,2) gives 13,333.33
PRACTICAL NO 3
MATHS FUNCTIONS
GRADE BASIC HRA PF NET
A 1000 150 80 1070
B 4000 600 320 4280
B 5000 750 400 5350
A 3000 450 240 3210
SUMIF()
Adds all the numbers in a range for which given condition is true. If sum_range(2 nd Range)
is given then values from sum_range are added otherwise values from range(1 st range) are
added where the given condition is true
e.g =SUMIF(B2:B5,”>3500”,E2:E5) gives 9630

AVERAGEIF()
This function is used to find average of all the numbers in a range for which given condition
is true. If average_range(2nd Range) is given then values from average_range are considered
otherwise values from range(1st range) are considered where the given condition is true
e.g =AVERAGEIF(B2:B5,”>3500”,E2:E5) gives 4815

COUNT()
Counts the number of cells that contains numbers. Remember date and time is treated as a
number. If there is a text entry in the range or as an argument then it will not give an error
e.g =COUNT(B2:B5) gives 4

COUNTA()
Counts the number of cells that are not empty. If there is text entry in the range or as an
argument then it will not give an error
e.g =COUNTA(B2:B5) gives 4

COUNTBLANK()
Counts the number of cells that are empty. If there is text entry in the range or as an argument
then it will not give an error
e.g =COUNTBLANK(B2:B5) gives 0

COUNTIF()
This function will count number of cells that are satisfying given condition
e.g =COUNTIF(B2:B5,”>1000”) gives 3

LARGE()
This function returns the kth largest value in a dataset. You can use this function to select a
value based on its relative standing. For e.g. you can use large to return the highest runner up
or 3rd place value.
e.g =LARGE(B2:B5,2) gives 4000

SMALL()
This function returns the kth smallest value in a dataset. You can use this function to select a
value based on its relative standing. For e.g. you can use small to return the lowest, 2 nd lowest
or 3rd lowest value.
e.g =SMALL(B2:B5,2) gives 3000
Practical no 4
Prepare a worksheet containing the Name of the salesman and sales for the months of
January, February and March in columns A, B, C and D respectively from rows 1 to 26, the
first row contains headings and the remaining rows contain data. Use your own data ensuring
that the sales entered in a month are minimum 100000 and maximum 300000.
Carry out the following operations on this worksheet.
1. Enter the following Bonus Table in columns H and I.
SALES BONUS
300000 2000
400000 3000
500000 4000
600000 5000
700000 6000
800000 7000
2. Save the worksheet under your name followed by your roll no. , question no. e.g.
MONA1235
3. Obtain the total sales of each salesman in the first quarter in column E.
4. Using VLOOKUP function obtain the bonus amounts to be given to each salesman in
column F.(Note if the total sales are say 319000, which is above 300000 and below 400000
then the Bonus amount will be 2000 )

Solution:
Saving the worksheet:
1. After typing in the data in columns A,B,C,D and Columns H,I click on the office
button and select ‘Save as’.
2. Select Excel workbook, type the name as ‘MONA1235’(i.e. name and roll number,
then 5 for the question no.) and click on save.

Total Sales:
1. Select E1 and type the heading ‘Total Sales’.
2. Select E2 and type =SUM(B2:D2) and press enter.
3. Select E2 and drag the fill handle to E26.

Bonus:
1. Select F1 and type the heading ‘Bonus’.
2. Select F2 and type =VLOOKUP(E2,$H$2:$I$7,2) and press enter.
3. Select F2 and drag the fill handle to F26.
PRACTICAL NO 5
THE FOLLOWING DATA HAS BEEN ENTERED IN EXCEL WORKSHEET

GEND SAL
NAME ER AGE CITY ES
MUKU 4980
ND M 25 SURAT 00
RAVEE 5750
NA F 23 NASIK 00
3780
SNEHA F 26 CHENAI 00
PARVE 6000
EN M 29 NASIK 00
KOLKA 6450
VILAS M 32 TA 00
NAGPU 7925
ANIKET M 27 R 65

Write steps to:


1. Display only those rows where the sales are less than 400000.
2. Display only those rows where the GENDER is “M”.
3. Display only those rows where the city Name starts with “N”.

1)FILTER
1. Select the range A1:E7
2. Click at Data Tab Filter.
3. Click at drop down of SALES
-Click at Number Filters
-Click at Less Than
-In the 2nd box type 40000
-Click at OK Button
2)FILTER
1. Select the range A1:E7
2. Click at Data Tab Filter.
3. Click at drop down of GENDER
-Click at TEXT Filters
-Click at Equals To
-In the 2nd box type M
-Click at OK Button.

3)FILTER
1. Select the range A1:E7
2. Click at Data Tab Filter.
3. Click at drop down of CITY
-Click at TEXT Filters
-Click at BEGINS WITH
-In the 2nd box type NS
-Click at OK Button
PRACTICAL NO 6
The following table shows the shipment forecast of tablets, laptops and desktop PCs
worldwide for the year 2015, 2016, 2017 and 2018.

PRODUC
T 2015 2016 2017 2018
DESKTO
P 113.6 103.3 97.8 94.4
LAPTOP
S 163.1 156.8 161.6 162.3
TABLET
S 208 174.9 163.7 150.3
TOTAL        

Write the steps to:


1. Find total product shipped in the year 2015,2016,2017,2018 in the cells B4, C4, D4
and E4.
2. Create 3-D Bar chart for the above data.
3. Create a line diagram for the year 2015 and 2018.
4. create Pie chart for the year 2017

I) To find the Total Product Shipped


1. Click at cell B5.
2. Type the formula as
=SUM(B2:B4) OR
=B2+B3+B4
3. Click at cell B5 and drag the fill handle up to cell E5
ii) To create a Bar Chart
1. select the range A2:E4
2. Click at Insert TabBar3D
3. Click at design TabSelect Data
-Click at edit Button of Horizontal (category)Axis Labels
-type Range as =SHEET1!B1:E1
-Click at ok button
-Click at OK button
3)To create line Chart for the year 2015 and 2018
1. select the range A2:B4,E2:E4
2. Click at Insert TabLINE2D
3. Click at design TabSelect Data
-Click at series1 in Legend entries
-Click at Edit Button of Legend Entries
-type range as =SHEET1!B1
-Click at series 2 in Legend entries
-Click at Edit Button of Legend Entries
-type range as =SHEET1!E1
-Click at ok button
-Click at OK button

4)To Create Pie Chart for the year 2017


1. select the range A2:A4,D2:D4
2. Click at Insert TabPie2D
3. Click at design TabSelect Data
-Click at series1 in Legend entries
-Click at Edit Button of Legend Entries
-type range as =SHEET1!D1
-Click at ok button
-Click at OK button
Practical no 7

(Use of Label, Command Button and Properties)

1 i) Write a project that allows to display the label as “WELCOME TO VIVA COLLEGE”.

ii) a) change the Caption property of the label as “WELCOME TYBCOM STUDENTS”.
.

iii) Include at least two command buttons to

a) CHANGE – to change the caption of the label.


b) EXIT-to exits the project.

Solution 1:

Using drag drop method objects controls like label, command buttons,designing of the form
is constructed. Further the properties to these objects are set as desired in the questions.

Step 1-Following objects are created in the VB environment while designing a form.

Object Properties Set Values


FORM name frmPract1
caption Practical 1
Label Name lblName
Caption Welcome to viva college
Command 1 Name cmdChange
Caption &Change
Command 2 Name cmdExit
Caption E&xit

Step 2- Following code should be written in the click event of cmdChange command button
code is written in the click event of cmdChange command button

Private Sub cmdChange_Click()


lblName.caption=”WELCOME TYBCOM STUDENTS”
End Sub
____________________________________
Private Sub cmdExit_Click()
End
End Sub

Practical no 8
Write an application with the following specifications:
A single text box to enter the text.
Three check boxes for Bold, Italics and Underlining the text in the text box as selected.
Three option buttons for Red, Green and Blue color of the text in the text box as selected.
A Command button to exit the application.

Step 1-Following objects are created in the VB environment while designing a form

Object Properties Set Values


Form Name Frmform1
Caption Practical no 7
Text 1 Name txtDisplay
Text blank
Check box 1 Name chkBold
Caption Bold
Check box 2 Name chkItalic
Caption Italic
Check box 3 Name chkUnderline
Caption Underline
Option button 1 Name optRed
Caption Red
Option Button 2 Name optGreen
Caption Green
Option button 3 Name optBlue
Caption Blue
Command 1 name cmdExit
caption E&xit

Step 2- Following code should be written in the click event


Private Sub cmdX_Click()
End
End Sub

Private Sub chkBold_Click()


If chkBold.Value = 1 Then
txtDisplay.FontBold = True
Else
txtDisplay.FontBold = False
End If
End Sub

Private Sub chkItalic_Click()


If chkItalic.Value = 1 Then
txtDisplay.FontItalic = True
Else
txtDisplay.FontItalic = False
End If
End Sub

Private Sub chkUnderline_Click()


If chkUnderline.Value = 1 Then
txtDisplay.FontUnderline = True
Else
txtDisplay.FontUnderline = False
End If
End Sub

Private Sub optBlue_Click()


txtDisplay.ForeColor = vbBlue
End Sub

Private Sub optRed_Click()


txtDisplay.ForeColor = vbRed
End Sub

Private Sub optGreen_Click()


txtDisplay.ForeColor = vbGreen
End Sub
PRACTICAL No:-9

Write a VB project to Calculate Simple Interest and Compound Interest

Step 1-Following objects are created in the VB environment while designing a form

Object Properties Set Values


Form Name frmSimpleCompound
Caption Simple and Compound
Label 1 Name lblAmt
Caption Principal Amount
Label 2 Name lblYrs
Caption Number of Years
Label 3 Name lblRate
Caption Rate of Interest
Label 4 Name lblInt
Caption Interest Amount
Text box 1 Name txtAmt
Text Blank
Text box 2 Name txtYrs
Text Blank
Text box 3 Name txtRate
Text Blank
Text box 4 Name txtInt
Text Blank
Locked True
Command 1 Name cmdSimple
Caption &Simple
Command 2 Name cmdCompound
Caption &Compound
Command 3 Name cmdClear
Caption C&lr
Command 4 Name cmdExit
Caption E&xit

Step 2- Following code should be written in the click event

Private Sub cmdSimple_Click()


txtInt=(val(txtAmt)*val(txtYrs)*val(txtRate))/100
End Sub
Private Sub cmdCompound_Click()
txtInt=val(txtAmt)*(1+val(txtRate)/100)^val(txtYrs)-val(txtAmt)
End Sub

Private Sub cmdClear_Click()


txtAmt=””
txtYrs=””
txtRate=””
txtInt=””
txtAmt.setFocus
End Sub

Private sub cmdExit_Click()


End
End Sub
PRACTICAL NO:-10

Write VB project to design a suitable form which allows the user to enter an integer.
Calculate and display the factorial of that integer when the calculate button is clicked.

Steps 1-Following objects are created in the VB environment while designing a form

Object Properties SetValues


Form Name frmFact
Caption Factorial
Label1 Name lblInt
Caption Integer
Label2 Name lblFact
caption Factorial
Text1 Name txtInt
text Blank
Text2 Name txtFact
Text Blank
Locked True
Command1 Name cmdCalc
caption &Calculate
Command2 name cmdClear
Caption C&lear
Command3 Name cmdExit
Caption E&xit

Step 2- Following code should be written in the click event


Private Sub cmdCalc_Click()
Dim I As Integer
txtFact.Text=1
for I=1 To Val(txtInt.Text)
txtFact.Text=Val(txtFact.Text)*I
Next I
End Sub

Private sub cmdClear_Click()


txtInt.Text=””
txtFact.Text=””
txtInt.SetFocus
End Sub
Private Sub cmdExit_Click()
End
End Sub

You might also like