Engineering for the real world

Quick bit of reformatting in Excel

I spent most of today working with an Excel spreadsheet. I don't know whether I have been spending too much time with Numbers, but looking at all those white rectangles with grey lines was just too much for me today. I wanted something that looked a little better than the usual spreadsheet.

It's amazing what a difference just turning off the gridlines can make; the spreadsheets just look so much more elegant and professional. The only problem is that standard formatting for excel has the text essentially equally spaced between the cells and within the cells. My spreadsheet had word wrapping switched on so some of the cells had one row of text, some had two, and some had more. Without the gridlines it was really difficult to tell where one cell ended and another began. I needed a little padding between the text in different cells to complete my little makeover.

It's not perfect but I wrote a little excel macro to help me with this. It looks down the first column in the spreadsheet and checks if each cell contains a value. If it does, it adds a little padding to the cell, and then carries on to the next until it reaches a cell which doesn't contain anything. If it is useful to you, here is my script, hopefully someone might find it useful.

Sub AddRowPadding()
Dim i As Integer
i = 1
Do While i < 32000
If IsEmpty(Cells(i, 3).Value) Then
Exit Do
End If
startingHeight = Rows(i).RowHeight
Rows(i).RowHeight = startingHeight + 10
i = i + 1
Loop
End Sub