You are on page 1of 4

BCOM 212 – Financial Modelling Lab Yash Jain (Roll no.

03914788818)
Date: 13/03/2021 BCOM 4A

ASSIGNMENT 2 – ELECTION DATA


Tasks:
1. Remove duplicates in PRECINCT.
2. Use Filter to select Republicans.
3. Use sort to sort the data by voter in ascending order
4. Lookup Ballot Status to add it from Data2 sheet to Data1 sheet
5. Use conditional formatting to highlight the voters above the age of 50.

STEPS:
1. Open the excel sheet that has the data. First, we need to remove the duplicates. For that,
first go to the first sheet Data1.
2. Select the table, and go to Data -> Remove Duplicates.

3. The duplicates are searched, and in case there are no duplicates, it will show no
duplicates found, like :-

4. Now, repeat the process for Data2 sheet. There would be some duplicate values that
would be removed from the data base.

5. Now that the duplicates are removed, we need to filter the data. For that, go to Data1
sheet, and go to Home -> Sort and Filter -> Filter.
BCOM 212 – Financial Modelling Lab Yash Jain (Roll no. 03914788818)
Date: 13/03/2021 BCOM 4A

6. Now, each of the headers in the table would have a drop down icon. Select the one from
the column PARTY. There, select Republicans.

7. The table is now filtered. Now, select voter id column, click the drop down box, and
select Sort A to Z for sorting the table.
BCOM 212 – Financial Modelling Lab Yash Jain (Roll no. 03914788818)
Date: 13/03/2021 BCOM 4A

8. Now, for Lookup, we are going to use Vlookup() function for the ballot status. Before
that, we would define the table in data2 as an array. For that, select the data in data2
sheet, and go to Formulas -> Define Name.

9. Now that the data2 array is created, it is time to use vlookup() function. In a column
beside the years reg. in data1 sheet, create a column Ballot status. Now, use the
following function :-
=vlookup(A3,DATA2,2,TRUE)
Where A3 is the value which needs to be matched, DATA2 is the array in which the
value needs to be matched, 2 is the index number, which means that the value in the
column next to the column in which the A3 value is found, is returned, and TRUE
means an approximate match.

Use this formula to get Ballot Status and then just double click on the bottom-right dot
on the cell, to copy the formula to all other entries in the table.
BCOM 212 – Financial Modelling Lab Yash Jain (Roll no. 03914788818)
Date: 13/03/2021 BCOM 4A

10. Now, to use conditional formatting on Age group, we need to be careful. The values in
the age group column are treated as text, not numbers so it is different to use conditional
formatting in this case. We need to go to Conditional Formatting -> Highlight Cells
Rules -> Greater than. There, input the values 41-50 and press ok.

Now that all the things are done, the worksheet would look like this –

The workbook is here - https://drive.google.com/file/d/1n7wgZcdGz1oI-


o33evPubI5KN81xUFVb/view?usp=sharing

You might also like