04. excel countif and vlookup. file -> open -> 04b-datastart.xlsx

65
04. Excel Countif and Vlookup

Upload: rosemary-obrien

Post on 18-Jan-2018

234 views

Category:

Documents


0 download

DESCRIPTION

Click on new tab icon to insert new sheet

TRANSCRIPT

Page 1: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

04. Excel Countifand Vlookup

Page 2: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

File -> Open -> 04b-datastart.xlsx

Page 3: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Click on new tab icon to insert new sheet

Page 4: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Conditional Formatting

Page 5: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Select Sheet1

Page 6: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Select Column G

Page 7: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

We want to highlight any cells with a P/E greater than 15

Page 8: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Select Home -> Conditional Formatting

Page 9: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Format cells greater than 15

Page 10: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Click OK

Page 11: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Any P/E greater than 15 is highlighted

Page 12: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Challenge

• Highlight any cells with a Price less than 50

Page 13: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Count, Sum, AverageMax, Min

Page 14: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Insert new sheet

Page 15: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Want to find summary stats for Market CapType in the following headings

Page 16: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Click Formulas -> AutoSum -> Count Numbers

Page 17: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Inserts the COUNT function

Page 18: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Tell Excel what column you want to count:Go to Sheet 1 and select Column E

Page 19: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Select Column E

Page 20: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Press Enter on keyboard

Page 21: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

There are 2496 companies with market capitalisation information in dataset

Page 22: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Select next cell

Page 23: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Select Formulas -> AutoSum -> Sum

Page 24: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Tell Excel what to Sum:Select Sheet1 then Column E and press Enter

Page 25: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Have now calculated the total market capitalisation of all 2496 companies

Page 26: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Challenge

• For market capitalisation calculate:– Average–Maximum–Minimum

Page 27: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Countif and Sumif

Page 28: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

We sometimes want summary statistics for different groups e.g. countries

Page 29: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Type in these headings

Page 30: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Select Cell D8, for Countif DE

Page 31: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Select Formulas -> More Functions ->Statistical -> COUNTIF

Page 32: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

For Range choose Sheet1 Column D to count the number of observations per country

Page 33: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Click Column D

Page 34: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Click Criteria

Page 35: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

For Criteria choose the cell with the country name

Page 36: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Click OK

Page 37: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

There are 683 companies from Germany (DE)

Page 38: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

For cell E8 select Formulas -> Math & Trig -> SUMIF

Page 39: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

For Range choose Sheet1 Column D

Page 40: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Select Column D

Page 41: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Click Criteria

Page 42: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

For Criteria choose the cell with the country name

Page 43: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Click Sum_range

Page 44: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

For Sum_Range choose Sheet1 Column E as it contains market capitalisation

Page 45: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Select Column E

Page 46: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Click OK

Page 47: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Calculates the total market capitalisation of companies based in Germany

Page 48: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Challenge

• For France, Britain and Ireland use:– Countif to calculate number of companies in each

country– Sumif to calculate the total market capitalisation of

these companies in each country

Page 49: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Vlookup

Page 50: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Select Sheet2

Page 51: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Sometimes we want to extract data from one list into another

Page 52: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Type in the full names of a number of companies featured in main dataset

Page 53: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

We want to obtain P/E and TotalReturn data for these companies

Page 54: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Click Formulas -> Lookup & Reference -> VLOOKUP

Page 55: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Lookup_value -> Click on your first company’s name

Page 56: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Click on Table_array ->Then open Sheet1 containing data

Page 57: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Select Column headings B to I

Page 58: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Click on Col_index_num and type 6

Page 59: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Click on Range_lookup and type false

Page 60: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Click OK

Page 61: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

We have now extracted the P/E ratio for BP from our main dataset

Page 62: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Analyse the VLOOKUP formula to understand how it works

Page 63: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Analyse the VLOOKUP formula to understand how it works

A5 is the value that we want to search for

Sheet1!B:I is the dataset that we look in (the first column of your dataset should always be the one which contains the name you are looking for)

6 is the column number in the dataset that we want to find

False is whether we will accept approximate matches

Page 64: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

File -> Save As -> 04c-datacompleted.xlsx

Page 65: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx

Challenge

• Use Vlookup to obtain TotalReturn for your company• Repeat for some other companies