Select the cells where you want the lines
Go to the Home tab
Click the Borders drop-down in the Font group
Choose the border style you want
Select Bottom Border, Top Border, Left Border, Right Border, or All Borders
To add custom lines, click More Borders
Pick the line style and color
Click the border positions in the preview box
Click OK
To add gridlines, go to the View tab
Check Gridlines
To print gridlines, go to the Page Layout tab
Check Print under Gridlines
