I had one a while back. I created three tabs: one for weight tracking including targets so I knew where I should be, one for entering the calories of foods I eat on a regular basis and one for calroie tracking which I recreated week by week. Then when I enter a food I have recorded in tab 2 it pulls over the amount of calories and just by stating the quantity it can work out what the calories were.
Then with a few more tweaks its easy to set up daily, weekly max calories and calculate from that if you have a calorie deficit. I even got mine to convert the total deficit into exected weight loss, but a warning that the results do not always reflect the numbers.
My brother used a more complex version that uses Voodoo Basic to perform the calculations and was a little more accurate.