You are on page 1of 48

Excel Formulas

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

Delete Rows

Select cell A2

Click Delete -> Delete Sheet Rows

Find and Replace

Click on any blank cell then Click Find & Select -> Replace

Find what: N.A.

Click Replace All

Click OK

Select Cell I1

Type

Number of Shares

Resize Columns

Click on the line between Columns I and J and drag to the right to expand the column

Can now see Number of Shares

Using Formulas

All formulas begin with an = Can use maths operators + - * /

Click on Cell I2

Type =G2/H2 This means number in cell G2 is divided by number in cell H2

Calculates Number of Shares = MarketCap/Price

Copying Formulas: Relative References

Click on Cell I2

Press Ctrl+c on keyboard to copy cell

Click on Cell I3 and press Ctrl+v

Have now calculated the number of shares of the next company

Double-Click on the bottom right corner of I3

The rest of the column is filled with the same formula

When copying and pasting:


If we want to refer to the same cell all the time we use $ signs before both row and column $A$1 If we want only the column to always stay the same we use a $ sign before the column letter $A1 If we want only the row to always stay the same we use a $ sign before the row number A$1

All of the cells in this column are formulas. If you change the original data the result changes.

Paste Values

To keep just the values you can copy and paste values

Click on the top of Column I to select the whole column

Press Ctrl+c on keyboard to copy column

Click on Home -> Paste -> Paste Values -> 123

The cells now contain values which will not change

Keyboard Shortcuts to move around

Click on cell A1

Press Ctrl + Right Arrow on keyboard to move to right of dataset

Press Ctrl + Down Arrow on keyboard to move to bottom of dataset

Press Ctrl + Up Arrow on keyboard to move back to top of dataset

Press Ctrl + Shift + * on keyboard to select whole dataset

Freeze Windows

Click on cell B2

Click View -> Freeze Panes -> Freeze Panes

Press Ctrl + Down Arrow to move to bottom of dataset

The top row and first column are always visible from everywhere in dataset

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

Challenge
Calculate a column showing the price of 10 shares in each company Copy and paste values

You might also like