Kevin C. Wong

Calorie Counter Spreadsheet

I decided to try using a spreadsheet rather than an app since I'm getting tired of ads (the two apps I used a lot are MyFitnessPal and Lose It!).

Search for "calorie tracking numbers spreadsheet" and the first hit is Free Calorie Tracker Spreadsheet in Google Sheets and that looks about the level I want. You're entering a line with date, meal type, description, and calories and then it'll calculate daily, weekly and monthly totals.

The second hit is a spreadsheet where you're putting in protein, carbs, veggies, fruits, fats, condiments and it will do summaries but that's way too much work. The third entry is another spreadsheet that also wants a lot of data but doesn't have summaries.

Back to the first spreadsheet. It's a Google spreadsheet so I exported to XLS and imported into Apple Numbers. Some of the formulas broke:

WeekKey uses

=IF(A2="","",TEXT(A2,"yyyy")&"-W"&TEXT(WEEKNUM(A2,2),"00"))
where that TEXT function doesn't exist in Numbers. I replaced it with this formula

IF(ISBLANK(A2),"",CONCATENATE(YEAR(A2),"-W",WEEKNUM(A2)))
I didn't find how you would concatenate strings inline instead of using a function.


Similarly MonthKey

=IF(A2="","",TEXT(A2,"yyyy-mm"))
is replaced with

IF(ISBLANK(A2),"",CONCATENATE(YEAR(A2),"-",(IF(MONTH(A2)<10,CONCATENATE("0",MONTH(A2)),MONTH(A2)))))
A little longer because MONTH(A2) doesn't return a leading zero which I like


On the second page the date field is

=SORT(UNIQUE(FILTER(Entries!A2:A1001,Entries!A2:A1001<>"")))
which I replaced with

SORT(UNIQUE(FILTER(Entries::Table 1::A,ISDATE(Entries::Table 1::A))))
And my fix use the whole table not just the first 1k rows.


Week and Month fixes are very similar.


Tab three unfortunately Numbers does not support dynamic drop down lists. So instead I changed the field to a date field and you have to type in the date yourself.

Apple Numbers Calorie Counter