04. excel countif and vlookup. file -> open -> 04b-datastart.xlsx
DESCRIPTION
Click on new tab icon to insert new sheetTRANSCRIPT
![Page 1: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/1.jpg)
04. Excel Countifand Vlookup
![Page 2: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/2.jpg)
File -> Open -> 04b-datastart.xlsx
![Page 3: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/3.jpg)
Click on new tab icon to insert new sheet
![Page 4: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/4.jpg)
Conditional Formatting
![Page 5: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/5.jpg)
Select Sheet1
![Page 6: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/6.jpg)
Select Column G
![Page 7: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/7.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/8.jpg)
Select Home -> Conditional Formatting
![Page 9: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/9.jpg)
Format cells greater than 15
![Page 10: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/10.jpg)
Click OK
![Page 11: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/11.jpg)
Any P/E greater than 15 is highlighted
![Page 12: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/12.jpg)
Challenge
• Highlight any cells with a Price less than 50
![Page 13: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/13.jpg)
Count, Sum, AverageMax, Min
![Page 14: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/14.jpg)
Insert new sheet
![Page 15: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/15.jpg)
Want to find summary stats for Market CapType in the following headings
![Page 16: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/16.jpg)
Click Formulas -> AutoSum -> Count Numbers
![Page 17: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/17.jpg)
Inserts the COUNT function
![Page 18: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/18.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/19.jpg)
Select Column E
![Page 20: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/20.jpg)
Press Enter on keyboard
![Page 21: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/21.jpg)
There are 2496 companies with market capitalisation information in dataset
![Page 22: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/22.jpg)
Select next cell
![Page 23: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/23.jpg)
Select Formulas -> AutoSum -> Sum
![Page 24: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/24.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/25.jpg)
Have now calculated the total market capitalisation of all 2496 companies
![Page 26: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/26.jpg)
Challenge
• For market capitalisation calculate:– Average–Maximum–Minimum
![Page 27: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/27.jpg)
Countif and Sumif
![Page 28: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/28.jpg)
We sometimes want summary statistics for different groups e.g. countries
![Page 29: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/29.jpg)
Type in these headings
![Page 30: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/30.jpg)
Select Cell D8, for Countif DE
![Page 31: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/31.jpg)
Select Formulas -> More Functions ->Statistical -> COUNTIF
![Page 32: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/32.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/33.jpg)
Click Column D
![Page 34: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/34.jpg)
Click Criteria
![Page 35: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/35.jpg)
For Criteria choose the cell with the country name
![Page 36: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/36.jpg)
Click OK
![Page 37: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/37.jpg)
There are 683 companies from Germany (DE)
![Page 38: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/38.jpg)
For cell E8 select Formulas -> Math & Trig -> SUMIF
![Page 39: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/39.jpg)
For Range choose Sheet1 Column D
![Page 40: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/40.jpg)
Select Column D
![Page 41: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/41.jpg)
Click Criteria
![Page 42: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/42.jpg)
For Criteria choose the cell with the country name
![Page 43: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/43.jpg)
Click Sum_range
![Page 44: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/44.jpg)
For Sum_Range choose Sheet1 Column E as it contains market capitalisation
![Page 45: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/45.jpg)
Select Column E
![Page 46: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/46.jpg)
Click OK
![Page 47: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/47.jpg)
Calculates the total market capitalisation of companies based in Germany
![Page 48: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/48.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/49.jpg)
Vlookup
![Page 50: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/50.jpg)
Select Sheet2
![Page 51: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/51.jpg)
Sometimes we want to extract data from one list into another
![Page 52: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/52.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/53.jpg)
We want to obtain P/E and TotalReturn data for these companies
![Page 54: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/54.jpg)
Click Formulas -> Lookup & Reference -> VLOOKUP
![Page 55: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/55.jpg)
Lookup_value -> Click on your first company’s name
![Page 56: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/56.jpg)
Click on Table_array ->Then open Sheet1 containing data
![Page 57: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/57.jpg)
Select Column headings B to I
![Page 58: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/58.jpg)
Click on Col_index_num and type 6
![Page 59: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/59.jpg)
Click on Range_lookup and type false
![Page 60: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/60.jpg)
Click OK
![Page 61: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/61.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/62.jpg)
Analyse the VLOOKUP formula to understand how it works
![Page 63: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/63.jpg)
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](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/64.jpg)
File -> Save As -> 04c-datacompleted.xlsx
![Page 65: 04. Excel Countif and Vlookup. File -> Open -> 04b-datastart.xlsx](https://reader033.vdocuments.site/reader033/viewer/2022051405/5a4d1b667f8b9ab0599b0967/html5/thumbnails/65.jpg)
Challenge
• Use Vlookup to obtain TotalReturn for your company• Repeat for some other companies